45
21
I have an Ubuntu 10.04 box with an EXT4 partition. This partition is set to automatically mount in /etc/fstab
. For the purposes of this post, we'll call it: /media/foo
.
Unfortunately, only root
can create/delete files/directories on the root filesystem of foo
. For other users to perform file/io on this volume, root
needs to create a directory and chmod
the permissions to others.
I would like to mount the volume such that anybody would be able to read/write to the volume without the need of root
to chmod
.
Below is my fstab
entry:
/dev/sda8 /media/foo ext4 rw,user,exec 0 0
The entry originally had defaults
instead of rw,user,exec
. I added the additional entries, namely, rw
so any user can read/write.
Unfortunately, the fstab
entry does not work. It mounts fine, but it still requires root
to intervene.
And, just in case anybody asks, simply running: chmod -R 777 *
on /media/foo
as root
does not work.
2What is the best place in Ubuntu to add this command at startup? – Ivan Balashov – 2014-08-18T13:35:15.143
@IvanBalashov: You can use an
@reboot
entry in/etc/crontab
among other possibilities. – Paused until further notice. – 2014-08-18T15:19:38.8733@DennisWilliamson Thanks. I've put it into
/etc/rc.local
if it makes any difference. What bugs me overall about this though, is that it really should be configured infstab
. If not, mount point can change, and scripts have to change too, maintenance hell. – Ivan Balashov – 2014-08-18T16:16:11.937Wow, i must start to guess those things :D thank you a lot. – m3nda – 2015-05-29T15:11:40.677
1Agree with the chmod, but add a: chmod +t /media/foo to enable users to create their own subdirectory – user1251840 – 2017-03-10T11:25:05.713