how to enable normal user to read/write ext3 partition
Hi all,
here's my current fstab Code:
/dev/sda6 swap swap defaults 0 0 I want normal user to be able to write also in /DATA but not necessarily be able to mount. How to achieve this? if i change this line Code:
/dev/sda7 /DATA ext3 noauto,owner,user,rw 0 0 Code:
/dev/sda7 /DATA ext3 umask=0000,defaults 0 0 there's error: Code:
mount: wrong fs type, bad option, bad superblock on /dev/sda7, Thanks. |
I think that the easiest way to achieve this would be to set the mount options up like this:
Code:
/dev/sda7 /DATA ext3 rw,suid,dev,exec,noauto,nouser,async 0 0 You can then mount as root and create a directory with the proper permissions for your users to write to. |
Well, if it's only one user, the most straightforward solution may be to chown the /DATA partition.
From the terminal (as root) chown -R username:username /DATA By the way, you can't write unless you mount. You can't tap a foot you haven't got. |
Tried both,didn't work.
sorry, i think I have to make it a clear question. How to make my /DATA so that only root can mount but all users can have write access to this partition without using any separate dir ? is this possible yes, i have read man mount especially about the options but i'm confused with suid,nodev,etc. |
I did this a while ago; haven't been messing around with user permissions and mounting too much lately, but actually it was chown'ing/chmod'ing the directory (when mounted). With FAT partitions you can give the umask mount option, but with ext3 it should be just about giving the correct permissions to the mounted filesystem (mount directory too, the top of the mounted filesystem). With mount options you can then control who can mount it, root only or users aswell.
|
Edit /etc/fstab to change option *user* to *nouser*. That prevents non-root users from mounting/umounting partitions. It's supposed to be the default behavior, so possibly just removing the *user* option would work. Explicitly stating *nouser* won't hurt anything.
Set the ownership of /DATA to root:users. Set the permissions to: u +rwx g +rwx o --- (or whatever you want others to have). The x permission on directories allows access to the directory (cd into) for members of the users group. Without x permission, users can't write to the directory. |
All times are GMT -5. The time now is 04:58 AM. |