You are not logged in.
It's just what the subject is. I mounted the usb with
sudo mount /dev/sda1 /home/username/mountdirIs this normal? As when I used a SD card, I could do whatever, make files, delete stuff, etc, without sudo, and yet I can't do anything with the usb. The usb doesn't have a read/write switch.
Last edited by thehexagon (2021-08-01 19:46:13)
NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX
Offline
Which filesystem? Who's the owner?
stat /home/parmjot/mountdirand check/post the output of mount.
Offline
usb is fat32, my device has ext4. Only one user so I'm the owner.
parmjot@archcrypt ~ stat /home/parmjot/mountdir
File: /home/parmjot/mountdir
Size: 49152 Blocks: 96 IO Block: 16384 directory
Device: 801h/2049d Inode: 1 Links: 57
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 1970-01-01 12:00:00.000000000 +1200
Modify: 1970-01-01 12:00:00.000000000 +1200
Change: 1970-01-01 12:00:00.000000000 +1200
Birth: -NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX
Offline
Well no, you're mounting it as root: https://wiki.archlinux.org/title/USB_st … ular_users
Your SD card either uses a file system that actually stores permissions or you have an fstab entry adjusting relevant logic here.
Last edited by V1del (2021-07-30 08:43:32)
Offline
even with the command in the wiki, adjusted for my case, it still needs perms to do stuff do it, like mkdir, etc. fstab has nothing about the usb drive, because it's the first time im using it with this machine. is it possible that I could do it so that I own the dir, with chmod or something?
NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX
Offline
chown
Offline
chown
Not supported by fat32.
Last edited by loqs (2021-07-30 22:56:58)
Offline
Not supported by fat32.
Point taken.
I was going by this "my device has ext4".
Offline
even with the command in the wiki, adjusted for my case
Please post what you actually adjusted as well as the output of "mount" …
it still needs perms to do stuff do it, like mkdir, etc. fstab has nothing about the usb drive, because it's the first time im using it with this machine. is it possible that I could do it so that I own the dir, with chmod or something?
… because this means you adjusted wrongly.
FAT is no real filesystem, there's nothing such as ownership or permissions on files.
They're all attributed to the whole branch when mounting the device.
You can tell the mount process what UID and GID to use and what permissions each file and directory shall have and/or to use the UID of the mounting user.
The only thing that could get in your way if the device is mounted read-only, but then even root couldn't write to it.
Online
even with the command in the wiki, adjusted for my case...
What was the command you used?
"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb
Offline
my command
parmjot@archcrypt ~ sudo mount -o gid=users,fmask=113,dmask=002 /dev/sda1 /home/parmjot/dir
parmjot@archcrypt ~ All i did was change the mountpoint
NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX
Offline
I found the issue with the above command, i'm not in the users group.
NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX
Offline
i did
parmjot@archcrypt ~ sudo mount -o gid=parmjot,fmask=113,dmask=002 /dev/sda1 dir
parmjot@archcrypt ~ cd dir
parmjot@archcrypt ~/dir mkdir d
parmjot@archcrypt ~/dir And It worked.
NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX
Offline
now I can't git clone to it:
parmjot@archcrypt ~/dir git clone https://aur.archlinux.org/speed-dreams-svn.git
Cloning into 'speed-dreams-svn'...
error: chmod on /home/parmjot/dir/speed-dreams-svn/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX
Offline
Zod wrote:chown
Not supported by fat32.
See above, permissions do not work on FAT32
Last edited by SimonJ (2021-08-01 19:26:11)
Rlu: 222126
Offline
So do I just reformat it? ext4 I'm geussing.
NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX
Offline
Depends on what you intend to use it for. If you just use this as an expanded space but don't need to share it with a Windows install then ext4 would generally be the better option here, yes.
Offline
reformatted. I chowned the dir the usb was mounted in after I mounted it. btw, you cant mount with the uid, gid and all those options. those are for non unix filesystems
NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX
Offline