LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 12-12-2006, 05:42 PM   #1
Babe963
Member
 
Registered: Aug 2006
Distribution: Debian unstable/testing
Posts: 34

Rep: Reputation: 15
Can't delet or create files...


Hi,,,


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 ...

Here is my fstab:

[HTML]/dev/sdb1 / ext3 defaults,errors=remount-ro 0 1
/dev/sdb5 none swap sw 0 0
/dev/hdd /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/hda /media/cdrom1 iso9660 ro,user,noauto 0 0
/dev/sdc1 /mnt/pretec auto rw,noauto,user,umask=000 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/sdd1 /mnt/card auto rw,noauto,user 0 0
/dev/sda1 /media/ntfs ntfs defaults,ro,umask=0 0 0
/dev/hdc1 /media/fat vfat rw,auto,umask=0,uid=1000,gid=1000 0 0
/tmp/hfsimage /mnt/mac hfs defaults,noauto,user,loop 0 0[/HTML]


here is an example of a folder on it ..

[HTML]devil@home:/mnt/pretec/card0001.uhs/dcim$ ls -l
total 576
drwxrwxrwx 2 devil devil 65536 2005-07-15 05:30 100canon
drwxrwxrwx 2 devil devil 65536 2005-07-25 03:57 104canon
drwxrwxrwx 3 devil devil 65536 2005-07-25 20:31 105canon
drwxrwxrwx 48 devil devil 65536 2005-07-27 05:25 106canon
drwxrwxrwx 3 devil devil 65536 2005-07-16 23:03 Backups
drwxrwxrwx 17 devil devil 32768 2005-12-17 09:57 Dolls
drwxrwxrwx 22 devil devil 65536 2005-07-20 06:36 LAptop
drwxrwxrwx 4 devil devil 32768 2006-06-17 12:25 My Albums
drwxrwxrwx 6 devil devil 32768 2006-06-17 12:20 Pbase
drwxrwxrwx 5 devil devil 65536 2005-07-16 03:43 School
devil@home:/mnt/pretec/card0001.uhs/dcim$[/HTML]


Any ideas??? all permissions seem to be set correctly ??
Why can't I write???
 
Old 12-12-2006, 06:19 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 12-13-2006, 12:39 PM   #3
Babe963
Member
 
Registered: Aug 2006
Distribution: Debian unstable/testing
Posts: 34

Original Poster
Rep: Reputation: 15
Yes I am logging in as devil..

When I stick my USB pen it works fine with these setting .. But my USb drive doesnt?

The file format is fat32 on both the pen and the drive ...
 
Old 12-13-2006, 04:34 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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.
 
Old 01-07-2007, 09:20 AM   #5
Babe963
Member
 
Registered: Aug 2006
Distribution: Debian unstable/testing
Posts: 34

Original Poster
Rep: Reputation: 15
Hi ,,

Still facing this problem ..
Can't seem to get over it ...

Will apprecaite any help..

Here is my current fstab:
Quote:
/dev/sdb1 / ext3 defaults,errors=remount-ro 0 1
/dev/sdb5 none swap sw 0 0
/dev/hdd /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/hda /media/cdrom1 iso9660 ro,user,noauto 0 0
/dev/sdc1 /mnt/pretec vfat rw,noauto,user,umask=0,uid=1000,gid=1000 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/sdd1 /mnt/card auto rw,noauto,user 0 0
/dev/sda1 /media/ntfs ntfs defaults,ro,umask=0 0 0
/dev/hdc1 /media/fat vfat rw,auto,umask=0,uid=1000,gid=1000 0 0
/tmp/hfsimage /mnt/mac hfs defaults,noauto,user,loop 0 0

Here is the mtab:
Quote:
/dev/sdb1 / ext3 rw,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
procbususb /proc/bus/usb usbfs rw 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
/dev/sda1 /media/ntfs ntfs ro,umask=0 0 0
/dev/hdc1 /media/fat vfat rw,umask=0,uid=1000,gid=1000 0 0
/dev/sdc1 /mnt/pretec vfat rw,noexec,nosuid,nodev,umask=0,uid=1000,gid=1000,user=devil 0 0
The drive is sdc1 mounted on /mnt/pretec which I use to mount my flash pen and USB mass storage ..
Flash pen works fine.. USB storage doesn't...
 
Old 01-11-2007, 05:32 PM   #6
Babe963
Member
 
Registered: Aug 2006
Distribution: Debian unstable/testing
Posts: 34

Original Poster
Rep: Reputation: 15
Anyone??
I am really stuck here need to sync my files between my laptop and PC...
 
Old 01-11-2007, 05:43 PM   #7
Rod Butcher
Member
 
Registered: Jul 2005
Location: Sydney Australia
Distribution: Mandriva 2007 x86_64
Posts: 34

Rep: Reputation: 15
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.
 
Old 01-11-2007, 06:09 PM   #8
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
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?
 
Old 01-11-2007, 06:39 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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"

Last edited by jschiwal; 01-11-2007 at 06:47 PM.
 
Old 01-12-2007, 10:31 AM   #10
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
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 ...
 
Old 01-12-2007, 02:55 PM   #11
Babe963
Member
 
Registered: Aug 2006
Distribution: Debian unstable/testing
Posts: 34

Original Poster
Rep: Reputation: 15
Here is what I get with "ls -ld /dev/sdc1"

brw-rw---- 1 root disk 8, 33 2007-01-12 20:49 /dev/sdc1

Why is it showing root??

The device is a PSD unit .. which I use as a photostorage and an external harddisk.. works fine with windows read and write?
 
Old 01-12-2007, 03:14 PM   #12
scorpion_gr
Member
 
Registered: Nov 2006
Location: London, UK
Distribution: openSUSE 11.1, openSUSE 10.3
Posts: 67

Rep: Reputation: 15
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.
 
Old 01-12-2007, 03:43 PM   #13
Babe963
Member
 
Registered: Aug 2006
Distribution: Debian unstable/testing
Posts: 34

Original Poster
Rep: Reputation: 15
Hmmmmm...

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?
 
Old 01-12-2007, 04:54 PM   #14
scorpion_gr
Member
 
Registered: Nov 2006
Location: London, UK
Distribution: openSUSE 11.1, openSUSE 10.3
Posts: 67

Rep: Reputation: 15
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?
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delet To wastebasket omnibus Linux - Newbie 4 08-20-2006 05:18 PM
delet a record from a file anoosh Programming 1 04-12-2006 11:07 AM
how to delet non-empty dirs bernstein Linux - General 6 04-30-2005 01:07 AM
Linux, Create Dirs=no, Create files=yes. Possible? tisource Linux - General 4 01-12-2004 10:05 PM
how do you delet more than 1 line using SED jsandro7 Linux - Newbie 2 12-12-2003 03:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration