Linux - NewbieThis 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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
My linux user account needs root privilage to delete files from the pendrive(/mnt/auto/sda1) or to move contents to it.How should I give root privilage as far as accessing the pendrive is concerned?
Rather than doing so, you should be asking how to mount the device with the correct privileges so users can write on it. This depends in a number of things, starting with the type of file system and how you mount it.
System auto mounts the pendrive at /mnt/auto/sda1.Can I edit fstab manually?
Sure. But the whole thing comes down at one single problem: how is your OS mounting your drive?
If it's specified in /etc/fstab, then you should be able to edit /etc/fstab and be done with it. If it's a FAT32 file system, you need to look at the umask option (you probably want umask=000). For other fs's, the thing can be different. Check the mount man page:
Other common ways to mount stuff are ivman and udev rules. But first, let's check that fstab.
Assuming that your pen drive is formatted with fat32. Fat32 volumes can't store linux permissions because they simply lack the structures to do so. So all the permissions are emulated at mount time, that's what umask does. A mask of 000 means that all the files will have permissions set to 777 (all permissions for all users).
As said, this is all related to vfat (and maybe ntfs, check the mount man page).
My pendrive is automatically mounted. The above error message is found after editing fstab as said by you..........
In your fstab line, try changing "user" by "user". I assume you also added the umask stuff. Then try this and see if it works as a normal user:
If it works, check if you can write something to the drive, for example:
If it works, then it should continue working on the next mounts. If it doesn't work then, please, give me the output of this command:
mount | grep sda1
Maybe it's not in fat32 after all.
I added the current user to the group ROOT. But that groupd didnt have the write permission on pendrive. WHat should be done on the group to give write permission on pendrive...........
As said, it depends on the type of file system that you have. In fat32 you set the permissions at mount time, using umask. With linux file systems you set the permissions on the fs once it's mounted, using chmod/chown like with any other directory or regular file.