LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-10-2005, 03:08 AM   #1
gitnrdun1115
LQ Newbie
 
Registered: Nov 2004
Posts: 14

Rep: Reputation: 0
Cant get mount permisions to work


I have read on the forums and google and ever solution I have thought would work on my problem doesn't.

I am trying to mount a second hard drive that is fat 32 into /fat-c. i want to use it for extra ftp storage and have a "binded" mount into the user directories for it. I can get the bind to work fine, but only root can write to the drive. I want to allow all users to be able to read, write, execute. EVERY thing i am trying in my fstab file is not working. I make a change to it and the permisions dont change or nothing. this is what the line looks like currently.

/dev/hdb1 /fat-c vfat user,rw,owner,exec,group,dev,suid,unmask=000,rw 1 0

well its all on one line.

I have tried umask of 022 of 1000 because i have found that, thats the way other users have used it. but nothing is changing the access rights to the device.... any help would be greatly appreciated.
 
Old 07-10-2005, 03:53 AM   #2
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
you could change the line to
/dev/hdb1 /fat-c vfat user,rw,owner,exec,group,dev,suid,umask=777,rw 1 0
Not very safe but you then
#ls -l /fat-c
to check what the permissions are set to.
edit
The line was mostly copied and I copied the umask incorrectly.

Last edited by Michael Johnson; 07-10-2005 at 04:47 AM.
 
Old 07-10-2005, 04:32 AM   #3
Harmaa Kettu
Member
 
Registered: Apr 2005
Location: Finland
Posts: 196

Rep: Reputation: 30
Quote:
unmask=000
Is that typo in your fstab ?
 
Old 07-10-2005, 06:17 PM   #4
gitnrdun1115
LQ Newbie
 
Registered: Nov 2004
Posts: 14

Original Poster
Rep: Reputation: 0
i did have that n in the umask... that was an error... i changed the mask to 000 and it works... thanks for all the help... i would of never caught that error.
 
Old 07-10-2005, 06:41 PM   #5
gitnrdun1115
LQ Newbie
 
Registered: Nov 2004
Posts: 14

Original Poster
Rep: Reputation: 0
one more thing that i forgot to ask... is there a way to get the mount that i created in my users name instead of root? that way if they copied a file out of it, into there directory it would be in there name and not roots?

/home/jim/storage/ is my mount and it looks like this

drwxrwxrwx 5 root root 8192 2005-07-10 18:38 storage/

i would rather it look like this......

drwxrwxrwx 5 jim users 8192 2005-07-10 18:38 storage/

thanks
 
Old 07-10-2005, 06:41 PM   #6
gitnrdun1115
LQ Newbie
 
Registered: Nov 2004
Posts: 14

Original Poster
Rep: Reputation: 0
the command im using in the rc.local file is:

mount --bind /fat-c /home/jim/storage
 
Old 07-10-2005, 07:28 PM   #7
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
The following line is all you should need in your /etc/fstab.
/dev/hdb1 /fat-c vfat users,rw,exec,umask=000 1 0
Why do you need it mounted in 2 separate locations.
If you want mounted in "/home/jim/storage" then use this line
/dev/hdb1 /home/jim/storage vfat users,rw,exec,umask=000 1 0
then use this to mount it
#mount /dev/hdb1
if you add "auto" to your parameters then it should be mounted at bootup.
If you add "noauto" then you can mount it manually from your .bashrc startup script in the root of your home directory. This will then take on the permissions of your current environment and you should have full access to it.
 
Old 07-10-2005, 11:47 PM   #8
gitnrdun1115
LQ Newbie
 
Registered: Nov 2004
Posts: 14

Original Poster
Rep: Reputation: 0
i wanted to have a link in the users home directory that needed access to it... for extra ftp storage and things like that... i also wanted to have the drive set up as a samba share to other computers in the LAN... is that making sense?
 
Old 07-11-2005, 12:03 AM   #9
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
OK that's good. you are setting up the share from /fat-c. I can see that part of what you are doing. But first lets get a straighforward single mount working the way you want. Why not create a symlink to it from the home directories. That way all users can symlink to it rather than a single user with a bound mount.
 
Old 07-11-2005, 12:18 AM   #10
gitnrdun1115
LQ Newbie
 
Registered: Nov 2004
Posts: 14

Original Poster
Rep: Reputation: 0
k, i have the mount the way i want it... how is the best way to get the users access to it?

the mount is /fat-c and it is done through fstab
 
Old 07-11-2005, 12:31 AM   #11
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
Provide a symlink to it from their home directory. See document in
#man ln

It will say do this
#ln -s /fat-c /home/jim/storage
This will allow them to use it from their own home directory
 
  


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
CD ejection permisions. e1000 Ubuntu 3 11-18-2005 10:33 PM
permisions charnel Linux - General 3 07-10-2005 03:53 PM
symlink permisions? shanenin Linux - Software 4 03-03-2005 10:51 AM
looking up file permisions starwind Linux - Newbie 1 10-15-2003 08:33 PM
Permisions ToeShot Linux - General 2 11-30-2001 01:53 AM

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

All times are GMT -5. The time now is 09:36 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