LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   permission settings issue....Help needed.... (https://www.linuxquestions.org/questions/linux-newbie-8/permission-settings-issue-help-needed-730956/)

varewoolf 06-05-2009 12:23 PM

permission settings issue....Help needed....
 
i have an issue to solve.. i am using mandriva linux 2009.. i have two user accounts sa User1 and User2... plus i have 2 windows partitions under /mnt. the issue is i have to set the user1 to access the /mnt but user2 should not have permission to access the /mnt..
how can i set this?? i need to do this on terminal preferably..

thanx in advance

bathory 06-05-2009 03:37 PM

Add uid=XXX (where XXX is the uid of User1) in the options part of /etc/fstab in the lines you use to mount the 2 windows partitions. Or from cli:
Code:

mount -t ntfs /dev/sda1 /mnt/win1 -o uid=XXX

varewoolf 06-06-2009 09:25 AM

this is my current fstab .. watchanges i should make??

Quote:

# Entry for /dev/sda5 :
UUID=3a8571d0-d9a9-11dd-913e-f77a45dc739a / ext3 relatime 1 1
# Entry for /dev/sda9 :
UUID=3e88ace8-d9a9-11dd-8eac-178f45d3e51c /home ext3 relatime 1 2
# Entry for /dev/sda1 :
UUID=18C9-7D9A /mnt/win_c vfat umask=0,iocharset=utf8 0 0
# Entry for /dev/sda6 :
UUID=500 /mnt/win_e ntfs-3g defaults 0 0
# Entry for /dev/sda7 :
UUID=500 /mnt/win_f vfat umask=0,iocharset=utf8 0 0
none /proc proc defaults 0 0
none /tmp tmpfs defaults 0 0
# Entry for /dev/sda8 :
UUID=3e2a7876-d9a9-11dd-ae90-37c7a77a8c2a swap swap defaults 0 0

saagar 06-06-2009 09:39 AM

setfacl -m u:user2:--- /mnt. Wont this work?

bathory 06-06-2009 10:40 AM

Since you didn't say the partitions you want to restrict and the uid of User1, to do this for /mnt/win_c for example you should modify fstab like this:
Code:

UUID=18C9-7D9A /mnt/win_c vfat uid=XXX,umask=0,iocharset=utf8 0 0

varewoolf 06-06-2009 11:22 AM

ok..well .. the situation is i need to set the permissions for the users like this:-

user1:- permission to access the windows partitions..
user2:-should be blocked from accessing the win partitions..

just tell me wats the edition i should make in the fastab??

bathory 06-06-2009 12:15 PM

Use the above example to restrict access to all 3 of your win partitions. Just replace XXX with the uid of the User1


All times are GMT -5. The time now is 05:29 AM.