Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Try adding these lines to your /etc/fstab file. Substitute the mount points for the ones that you want. You can change the word "auto" to whatever file system type you are using such as ext2 or ext3.
Code:
/dev/sda1 /mnt/sda1 auto user,gid=1000 0 0
/dev/sda2 /mnt/sda2 auto user,gid=1000 0 0
You can add more options such as noexec and nosuid, which I recommend doing. I just wanted to put in the options that you need to be able to mount the device with a normally privileged user account in the 1000 user group.
Though, For portability purposes I need to use the command line method
mount /dev/sda1 /mnt/usb -t ext3 -ogid=1000
so I can take it with me and access it on other machines.
This does not seem to work.
Any idea why?
Also,
That didn`t work
me@sarger:~$ sudo mount -a
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
syslog entries:
EXT3-fs: Unrecognized mount option "gid=1000" or missing value
Last edited by Sigkill(9); 10-04-2006 at 08:17 AM.
Put a space between the o and the g in the term -ogid=1000. It should read -o gid=1000.
Nevertheless this still won't work because a normally privileged user cannot give himself rights, which is implied in the -o gid=1000. The mount command looks in the /etc/fstab file to find out whether the normal user account has the right to mount the drive. You can use the sudo command to execute a command as root.
Code:
sudo mount ...
When it asks you for a password you give it the password of the normal user account, not the root password. The normal user account has got to be listed in the /etc/sudoers file.
I don't think that there is a portable way for normally privileged users to mount a file system without doing something to the operating system first. Whether you have to edit a line in /etc/fstab or whether you add the user account in /etc/sudoers you still have to do something to a normal system configuration before a normal user account can mount a file system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.