LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-05-2009, 01:23 PM   #1
varewoolf
LQ Newbie
 
Registered: Jun 2009
Posts: 23

Rep: Reputation: 15
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
 
Old 06-05-2009, 04:37 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,882

Rep: Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608
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
 
Old 06-06-2009, 10:25 AM   #3
varewoolf
LQ Newbie
 
Registered: Jun 2009
Posts: 23

Original Poster
Rep: Reputation: 15
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
 
Old 06-06-2009, 10:39 AM   #4
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
setfacl -m u:user2:--- /mnt. Wont this work?
 
Old 06-06-2009, 11:40 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,882

Rep: Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608
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
 
Old 06-06-2009, 12:22 PM   #6
varewoolf
LQ Newbie
 
Registered: Jun 2009
Posts: 23

Original Poster
Rep: Reputation: 15
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??
 
Old 06-06-2009, 01:15 PM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,882

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Some iptables settings for testing needed khandu Linux - Networking 7 05-02-2008 10:47 PM
Permission Settings - Kernel 2.6.11.10 donk Slackware 11 05-23-2005 12:35 PM
Need help with WuFTPd permission settings NotSavvy72 Linux - Newbie 2 06-16-2004 10:13 AM
Questions about Proftpd permission settings? gsmonk Linux - Networking 1 08-12-2003 11:36 AM
file permission help needed arka Linux - Newbie 1 12-24-2002 07:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration