Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 20th April 2005, 09:56 AM
phen Offline
Registered User
 
Join Date: Apr 2005
Location: Stuttgart, Germany
Posts: 17
Permissions of automounted devices, control of mountpoint

Hello!

Im using FC3, and my usb hdd is mounted flawlessly. But its permissions are wrong. I want to be able to write on the disk as a non-root user. How can I alter the permission settings? When I add the entry in /etc/fstab in the old fashioned way, the usb hdd has to be plugged at startup, otherwise the system complains.

The same with smbfs mounts: I added them to the fstab, but when I start my laptop disconnected from the home network, It hangs on "mounting SMB devices" (service "netfs")

does a "noauto" help here? I just got the idea....

another question: what does the LABEL=/ mean? why not oldfashioned "/dev/hda" ?

thanks,

kai


Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/hda3               swap                    swap    defaults        0 0
//192.168.0.1/mp3       /mnt/mp3                smbfs   rw,users,guest,fmask=0777,dmask=0777
//192.168.0.1/mp3_2     /mnt/mp3_2              smbfs   rw,users,guest,fmask=0777,dmask=0777
/dev/sda                /media/usbdisk1         auto    rw,umask=0111,dmask=0000
/dev/hdb                /media/cdrecorder       auto    pamconsole,exec,noauto,managed 0 0
Reply With Quote
  #2  
Old 20th April 2005, 11:45 AM
el_baschid Offline
Registered User
 
Join Date: Nov 2004
Location: koblenz, germany
Age: 30
Posts: 4
sers kai,

I had the same problem with my vfat partitions. solved the problem by adding uid and gid to the specific entries in fstab. I am not sure it's the same with usb devices...
Your smb automount problem sounds like an unreachable host to me. Similar problems occured when my servers smb service wasn't running or authentication fail. check if your host's smb server is reachable.
To avoid hanging, you can choose the noauto option in fstab so the devices won't be mounted at startup but have to be mounted manually...
LABEL=/ identifies the partition by picking the label name of the partition. A partition can be given a label name by using e.g. parted or the GUI version qparted. Fedora labels the root partition "/" within the installation, so you can mount it by using the label name...

greetz
el_baschid
Reply With Quote
  #3  
Old 20th April 2005, 12:28 PM
tonytiger Offline
Registered User
 
Join Date: Jun 2004
Posts: 168
Hi. Can you el_baschid tell me how to automount vfat disk with non root permissions? Can I give the disk permission only for specific user and root? Didn't quite catch what did you do to solve this, so very simple steps if you don't mind

Here's my fstab:
Code:
LABEL=/                 /                       ext3    defaults        1 1
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/hda5               swap                    swap    defaults        0 0
/dev/hda1               /mnt/hda1               vfat    noatime,user    0 0
#/dev/hdc                /media/cdrecorder       auto    pamconsole,exec,noauto,managed 0 0
/dev/hdc                /media/cdrecorder1      auto    pamconsole,exec,noauto,managed 0 0
Where hda1 is of course the disk I wan't to automount.
Thank you.

Tony
Reply With Quote
  #4  
Old 20th April 2005, 01:16 PM
el_baschid Offline
Registered User
 
Join Date: Nov 2004
Location: koblenz, germany
Age: 30
Posts: 4
hi tony,

when mounting vfat partitions at startup it's done as superuser, so you have to set new user and/or group ids for all file/directories on that particular partition. Therefor, you can use the uid and gid options in fstab. Just set uid=yourusername and gid=yourgroupname and your vfat permissions will be set to that user and group.
It looks like this in my fstab:
Code:
LABEL=/                 /                       ext3    defaults        1 1
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
LABEL=SWAP-hdb3         swap                    swap    defaults        0 0
/dev/hda5               /software           xfs     defaults,user,noauto,loop,encryption=aes128     0 0
/dev/hda6               /daten                  xfs     defaults,user,noauto,loop,encryption=aes128     0 0
/dev/hda7               /platten/movie          vfat    auto,rw,uid=el_baschid,gid=el_baschid,fmask=112,dmask=002,iocharset=utf8    0 0
/dev/hdb2               /home                   xfs     defaults        0 0
/dev/hdb5               /platten/share          vfat    auto,rw,uid=el_baschid,gid=el_baschid,fmask=112,dmask=002,iocharset=utf8    0 0
/dev/hdb6               /platten/music          vfat    auto,rw,uid=el_baschid,gid=el_baschid,fmask=112,dmask=002,iocharset=utf8    0 0
I hope that helps you...

greetz,
baschdi
Reply With Quote
  #5  
Old 20th April 2005, 01:18 PM
phen Offline
Registered User
 
Join Date: Apr 2005
Location: Stuttgart, Germany
Posts: 17
thanks for your answers, but maybe there was a misunderstanding: when i disconnect my laptop from the net (and take it to the uni, for example), it is obvious, that there is no route to the server and its smb-devices anymore. I want them to be mounted only when they are available.
I tried the nauto option, and it works, hence the system does not try to mount usb and smb at startup, but now i have to mount them from the console with my own hands (poor me) :-(

My wishful thinking was something like:
-I add all entries of smb and usb devices in my fstab (with the permissions i want)
-the system does not try to mount them on startup (it is a laptop, it's not always at home!!!!)
when -for example my usb stick- is connected to the laptop, konqueror (or kde volume manager, hal, autofs or whatever service is in charge) mounts it, when I click on the mountpoint directory.

all this hotplugging automounting stuff confuses me

any ideas?

@tonytiger:
the options uid and gid are used to specify the owner and the group of all files and folders on the mounted device. furthermore, you can set the permissions for the owner,group and everybody with dmask, fmask and umask.

/dev/hda1 /mnt/hda1 vfat noatime,uid=name,umask=0033,dmask=0011,fmask=0011

leaving the first two flags of all masks "0" enables the owner and root (i think) to do everything they want. edit the last two flags to your choice!

try it with a line like this. and check man fstab for further information.
Reply With Quote
  #6  
Old 20th April 2005, 01:35 PM
el_baschid Offline
Registered User
 
Join Date: Nov 2004
Location: koblenz, germany
Age: 30
Posts: 4
hi phen,

sorry, my mistake....
I am having a similar problem with smbmount and I think it isnt working because smbfs doesnt use user or users option. so you have to mount them manually. If you find another solution, tell me please...

to make konqueror mount your usbdisk on clicking the mountpoint directory, just add pamconsole or user to the options in fstab. that does it for me...
Should look like this then:
Code:
/dev/sda                /media/usbdisk1         auto    pamconsole,rw,umask=0111,dmask=0000
greetz
Reply With Quote
  #7  
Old 20th April 2005, 05:54 PM
tonytiger Offline
Registered User
 
Join Date: Jun 2004
Posts: 168
Thank you both. Now the vfat disk is mounted for my user.
I still have some problems with the permissions. I think fmask dmask is the permissions for files and directories, but what is umask? Is it the permissions for user created files?

Tony
Reply With Quote
  #8  
Old 20th April 2005, 09:32 PM
tonytiger Offline
Registered User
 
Join Date: Jun 2004
Posts: 168
I think I got it. I was little distracted since the numbers 1,2,4 are substracted from 7 to get the right permissions - opposite to chmod command where the numbers are summed

Tony
Reply With Quote
Reply

Tags
automounted, control, devices, mountpoint, permissions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Permissions on automounted USB Drive namelessjon Hardware & Laptops 0 12th December 2007 12:15 PM
Automounted USB hard drive, have no permissions nardinc Hardware & Laptops 0 20th November 2006 03:16 PM
Automounted device permissions troubles nufchavq Using Fedora 1 13th May 2006 12:43 AM
No volume control elements and/or devices found. PaLoBo Using Fedora 6 15th November 2005 06:00 PM
No Volume Control Elements and/or devices found Cellar Dweller Hardware & Laptops 17 15th July 2005 12:56 PM


Current GMT-time: 10:03 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat