Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I am trying to mount my external USB drive on my Linux box .. I have already everything set in fstab so that it would mount my USB stick and everything was cool until I plugged this drive..
All permissions are set for user to read and write and execute..
I have been trying to delete a few files from it with no success and so is trying to copy or create anything ...
I take it that your username is "devil". Can you look at the contents of "/etc/mtab"?
What is the filesystem on that usb drive. I usually use the "uid=" and "gid=" options, as you have for /dev/hdc1.
You can use a username/groupname rather than looking up the cooresponding uid.
I.E: "uid=devil,gid=devil". The long listing seems to indicate that the user "devil" has full permissions on the partition.
Moved: This thread is more suitable in the Linux General forum (taxonomy: -security) and has been moved accordingly to help your thread/question get the exposure it deserves.
This is what I have in /etc/fstab :-
/dev/sdc1 /mnt/stick auto umask=0 0 0
(it may be sda, sdb, sdd or whatever, depending on what your other drives are.
to mount :
mount -t vfat /dev/sdc1 /mnt/stick
(I created a script called mstick, containg justy this line, to do this).
you can then access the usb drive as /mnt/stick/...
... I just realised your problem was reading or writing to it, not mounting it. Please ignore the above.
Last edited by Rod Butcher; 01-11-2007 at 06:41 PM.
OK, let's assume it's not mounted and you mount it from CLI. What is the response of mount command? Any [error] messages? Maybe the filesystem is dirty and it's mounted read-only? What is the error message when you try to copy something to that drive using CLI?
What kind of device is it? Does it have a read-only switch? Your fstab entries look good except the last one.
Try "user,uid=devil,gid=devil".
I think that you misunderstood a previous posts. If this was using a different filesystem such as ext3, you could use the "owner" option which would do what you may be trying to do with "user=devil".
Do as "Emerson" recommends, because it doesn't seem to be a fstab entry problem.
Also, look at the long listing for the device itself. Does you system use udev. That can effect the permissions of the /dev/sdc and /dev/sdc1 devices. "ls -ld /dev/sdc1"
I am inclined to agree with jschiwal. By your example folder I notice the directory is called card0001.uhs Is this a camera or card reader? Many memory cards have a tiny switch to lock the card into read-only mode. I did that to a friend once as a joke.
Immediately after connecting the drive run the command mount with no parameters. It'll indicate if a drive is mounted as rw or ro. This is the line for my Pretec pen drive
/dev/sdh1 on /mnt/Pretec type vfat (rw,umask=002,gid=100)
Another idea is, how many files + directories are on the root of the device? FAT32 does have a limit, and the limit is greatly reduced if you use a lot of long filenames. I had my mp3 player reach that limit and I had a heck of a time removing enough files to make room to just move them into subdirectories. I had to delete 1 file, unmount, remount, delete 1 file ...
I think I bumped into a similar problem with my USB storage.
It turned out to be two things. The permissions were set to root and the drive was locked.
Definitally check that you haven't locked the drive. I was silly enough at the beginning to set a password to my USB drive while in windown with the U3 system loaded. Of course then on the Linux box the U3 system is useless but the password lock prevented me from modifying anything on the drive.
I am not sure how to unlock it..
I know I have formatted that drive in windows using swissknife and installed it into the PSD encloser and I was on the go ... Never loaded any software!!!!
Tried to chroot and chmod but it doesn't seem to work?
Well, mine is a smart drive with the U3 software in it. I didn't format it coz I like playing with it when in windows.
I thought you might have one of those too, since the symptoms are exactly the same.
Maybe something else is protecting the drive. Have you tried to use it on someone else's windows pc to see if there it works or if it prompts you or anything?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.