LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   automount permissions for external USB HHD (https://www.linuxquestions.org/questions/ubuntu-63/automount-permissions-for-external-usb-hhd-555022/)

mhg 05-18-2007 06:55 PM

automount permissions for external USB HHD
 
Hi All,

Just starting to try and learn/use Linux. Working through a problem with Ubuntu.

Being a NOOB, I am not sure how to best describe what I am dealing with.

I have a wireless device that streams music from my PC to home stereo. This device uses some type of server software. I knew just barely enough to use the instructions on the device web page to add the installation to synaptic and get it installed. Very cool.

I have all my music files on an external HHD, formated NFTS. I can see the files, and Totem will play the files. The problem is that I need to tell the server where to find the files. I browse to the folder, copy and paste the file path to the server settings, and get the message there is no such directory.

In this thread: http://forums.slimdevices.com/showthread.php?t=35254 , the folks there are thinking it is an issue of the server not having the correct permissions for accessing this external drive. Keep in mind most of this is still over my head, I am so new to Linux and command lines.

IF I understand correctly what folks are telling me, Ubuntu sees my server (slimserver) as a user, and that user needs the proper permissions to access the drive.

Now I don't know if that makes sense to anyone but me, but I think what I am attempting to learn, is how to set automount permissions for this drive, and hopefully any other USB drive. It was explained in the other thread that I do not want a permanent mount, or permissions for this drive only, as I will want to be able to also use USB for camera, thumb drive etc.

So far I am very happy with Ubuntu. I also have PCLinuxOS installed, but have been stuck with this one problem with Ubuntu. I definitely need to figure out this type of issue in order to use Linux as my main OS.

Should I post this in the newbie forum instead of the Ubuntu forum?

Thanks for any help.

keratos 05-20-2007 02:41 AM

hi mate.
welcome to Linux + Ubuntu.

One of the "issues" with Linux is that there is so much choice and options. All of the software you are likely to need is available in many guises. Having so much choice does thus mean that the user - you - may at times need to perform some integration, to bring all the components together. Once this is done, you have a very reliable, robust system, much faster than Windows, much more efficient and support is free!

So, onto your question:

I'm not familiar with the specific device you are setting up however, the way Linux "sees" these devices is the same for all - kind of a one size fits all.

First you need to know how Linux is referring to your device and how it is being accessed/set up for access. So, please post the output of these two commands:
Code:

mount -v
and
Code:

cat /etc/fstab

mhg 05-20-2007 01:28 PM

I was able to get this problem sort of sorted out. A person gave me a command line to change umask for the drive. He said the problem with his solution is that it does not fix automount permissions, so every time I turn drive off and on, I have to unmount and remount with his command line.

I am told V7.04 does not have this automount issue, so need to figure out if I need to upgrade, or if someone can help me configure automount with V6.10.

Any suggestions?

Thanks for the reply.

keratos 05-20-2007 01:48 PM

http://tldp.org/HOWTO/Automount-6.html#ss6.8

http://www.debian-administration.org/articles/127

darkonc 11-25-2009 01:44 AM

use gconf-editor to set vfat defaults.
 
start up gconf-editor from the command line

Negotiate to /system/storage/default_options/vfat/

click on mount-options value

It will bring up the various values. This will include
umask=077

change that to 022

022 will allow the owner to change files, but anybody to read them.

If you want everybody to be able to write the files (only in environments that you REALLY trust)... change it to
umask=000

umask=002

will allow members of your group to edit the file, but not others.

You would probably want to use that in conjuction with the 'gid=GroupName' value (not normally included).

This presumes that your thumb drive uses the FAT filesystem (almost always the case unless you do something strange with it).

Close the window and exit gconf-editor .... job should be done.


Either that or use gconftool:
gconftool --get /system/storage/default_options/vfat/mount_options
( outputs: )
[shortname=mixed,uid=,utf8,umask=077,exec,flush]

gconftool --type list --list-type string --set /system/storage/default_options/vfat/mount_options "[shortname=mixed,uid=,utf8,umask=022,exec,flush]"
( all one line)

The values that gconftool --get returns may be a bit different on your system... If so, you may want to change your --set values as well.

The important element to change is 'umask' -- which might be replaced with a combo of 'dmask' and 'fmask' (disk and file mask, respectively). ... but the numbers will be the same.


All times are GMT -5. The time now is 11:23 PM.