LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cant get mount permisions to work (https://www.linuxquestions.org/questions/linux-newbie-8/cant-get-mount-permisions-to-work-341773/)

gitnrdun1115 07-10-2005 02:08 AM

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.

Michael Johnson 07-10-2005 02:53 AM

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.

Harmaa Kettu 07-10-2005 03:32 AM

Quote:

unmask=000
Is that typo in your fstab ?

gitnrdun1115 07-10-2005 05:17 PM

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.

gitnrdun1115 07-10-2005 05:41 PM

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

gitnrdun1115 07-10-2005 05:41 PM

the command im using in the rc.local file is:

mount --bind /fat-c /home/jim/storage

Michael Johnson 07-10-2005 06:28 PM

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.

gitnrdun1115 07-10-2005 10:47 PM

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?

Michael Johnson 07-10-2005 11:03 PM

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.

gitnrdun1115 07-10-2005 11:18 PM

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

Michael Johnson 07-10-2005 11:31 PM

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


All times are GMT -5. The time now is 11:03 AM.