I formatted the disk in my computer as ext4. Now I'm trying to make it readable and writable for any user on this computer.
My entries in /etc/fstab look like this
# Data partitions
UUID=f59da30c-a2a8-4cab-97c6-4476453a3a31 /media/data1 ext4 defaults 0 0
UUID=73f1dad6-dcc4-4d12-996b-5e62406e7881 /media/data2 ext4 defaults 0 0
After mounting I also changed the owner of the mounted drives and gave rw permissions to every user as shown below. However other users still cannot write to that partition.
$ sudo mount -a
$ sudo chown -R :users /media/data*
$ sudo chmod -R g+rw /media/data*
$ cd /media/data1/
$ touch test
touch: cannot touch ‘test’: Permission denied
$ ll
total 20
drwxr-xr-x 5 root root 4096 Mär 18 19:13 ./
drwxr-xr-x 23 root root 4096 Mär 18 19:11 ../
drwxr-x---+ 2 root root 4096 Dez 15 18:15 cvg/
drwxrwxr-x 2 cvg users 4096 Mär 18 19:18 data1/
drwxrwxr-x 2 cvg users 4096 Mär 18 19:18 data2/
(what is strange is that data1 and data2 are not highlighted green in bash after mounting, which was the case when I mounted patitions on other computers).
I already did this on another computer so I don't understand what I did wrong this time :(.
Best Answer
groups
command. If its not, than usesudo adduser USER-NAME users
and then reload your session./media/data1/test
file already there (owned by someone else)? Tryll /media/data1/test
.mount|grep /media/data
command.Mind to share outputs of these?
P.S. In your
/etc/fstab
you set last parameter to0
, meaning the drives wont be checked byfsck
at system start when needed, are you OK with this?