LinuxQuestions.org
Review your favorite Linux distribution.
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 04-22-2012, 08:23 AM   #1
bobby33
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Rep: Reputation: Disabled
Mounting drive for a user


I want to mount /dev/sdb1 for one specific user to access only.

That user is not root.

If I mount to /mount/whatever then it's public and all users can access it.

I tried to mount it to /home/userx/whatever thinking only that user would have access but he could not access it (only root could). The drive also appeared in the file manager for other users which it need not.

How should I go about mounting this to achieve the desired goal? I'm using slackware btw.
 
Old 04-22-2012, 10:58 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
In fstab mount option should have nouser, owner. Just remove rwx access to mount point for others: chown chmod

Also there is a difference between /mnt/abc and /media/abc
 
Old 04-22-2012, 04:43 PM   #3
bobby33
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
That doesn't seem to work...

I set uid=myuser,fmask,dmask in fstab and the rights are correct now.
 
Old 04-23-2012, 09:22 AM   #4
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
create extra udev rules then

http://www.reactivated.net/writing_udev_rules.html
RTFM - be careful.

http://pvdevtools.readthedocs.org/en...dev_rules.html
 
  


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
Mounting network drive under a user's home folder, possible? XGhozt Red Hat 6 04-25-2011 11:29 PM
Mounting a hard drive so that a normal user get write access raghesh Linux - General 4 08-24-2007 01:26 AM
Mounting a drive as my user Avatar33 Linux - General 6 10-06-2005 02:01 AM
Mounting samba drive as user... elluva Linux - Networking 8 05-25-2004 09:35 PM
Mounting a network drive so a normal user can rwx it J.Q. Monkey Linux - Newbie 4 02-20-2004 08:17 AM


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

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