I have mounted a filesystem in a /mnt/storage but how do i make it accessible for all users not only root?
Asked
Active
Viewed 3.0k times
6
-
2With accessible, do you mean read-only access or read-write access to everyone? – Janne Pikkarainen Oct 29 '10 at 10:59
-
seems like a good question for [unix SE](http://unix.stackexchange.com/) also I'm guessing this depends on how it's mounted. is it a removable drive? what filesystem? nfs? samba? – xenoterracide Oct 29 '10 at 12:52
2 Answers
4
If you mount the drive with the -o noacl
option, everybody will have full read/write access.
If you only want people to be able to read the drive, chmod a+r /mnt/storage

Fahad Sadah
- 1,496
- 11
- 21
-
1
-
Got `mount: /mnt: wrong fs type, bad option, bas superblock on /dev/sdb1, missing codepage or helper program, or other error.` NTFS drive. – Vitaly Zdanevich Feb 20 '22 at 19:19
2
You can specify the uid & gid options to identify the mounted volume's owner. In /etc/fstab you can use something like:
/dev/sdc1 /mnt/storage ext4 uid=1000,gid=1000 1 2
or interactively:
sudo mount -o uid=1000,gid=1000 /dev/sdc1 /mnt/storage

rlduffy
- 241
- 1
- 4
-
2It's not possible to force an owner on a disk with an ext4 filesystem. Only filesystems which do not support Linux permissions like fat have an attribute for ownership/groupship: uid=value and gid=value. See the manual page on mount. – pintergabor Dec 31 '19 at 08:03