Modify fstab entry so all users can Read and Write to an EXT4 Volume
The mount option user
only allows the filesystem to be mounted by any user. The rw
option makes the filesystem not readonly. You will have to use permissions to make the parent directory writeable.
chmod 777 /media/foo
The chmod
command you show only affects the existing files within /media/foo
.
I think it would be simpler to change the fstab entry to:
/dev/sda8 /media/foo ext4 rw,user,exec,umask=000 0 0
umask=000
means that anyone can read, write or execute any file or directory in foo.
The usual default is 022, which means that users cannot write.
I had the same problem on openSUSE, but I think the solution can apply to this too. All the users I want to share the mounted filesystem belong to the same primary group: users
I have the following line in my fstab:
/dev/<partition> <mount_point> ext4 rw,acl 0 0
and I ran the following commands:
sudo chgrp -R users <mount_point>
sudo setfacl -d -m g::rwx <mount_point>
so that newly created files or directories get those permissions. This implies that you have the acl package installed.