LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 06-07-2005, 09:52 AM   #1
zakidad
LQ Newbie
 
Registered: Aug 2004
Location: Serdang
Distribution: none
Posts: 26

Rep: Reputation: 15
USB drive permission


Hi all. There something happen with my usb drive that I could not get the access to add/save new files and access/change any files inside it. T tried to chmod 777 the usb directory (since I mounted it on /mnt/usb). Try to change it through GUI, and still denied. What actually caused this sudden problem? How can I get access to my files and add/change as I usually did with my USB drive? I just happen yesterday and I keep wondering why....Hope some of you guys have any suggestion or solution?? I realy appriciate it and thanks in advance for your help...
Bye -Dat Dat@zakidad
 
Old 06-07-2005, 10:18 AM   #2
anurup
LQ Newbie
 
Registered: Nov 2004
Location: India
Distribution: Fedora Core 4 Test 3
Posts: 14

Rep: Reputation: 0
Check the umask parameter in /etc/fstab for the usb drive. What does it say?

Another common reason for what you are describing is that you may have mounted the drive as root and then tried accessing it as an ordinary user. Try unmounting as root and then remounting as the user.
 
Old 06-07-2005, 10:25 PM   #3
zakidad
LQ Newbie
 
Registered: Aug 2004
Location: Serdang
Distribution: none
Posts: 26

Original Poster
Rep: Reputation: 15
Hmmm...well, I login to my system as a root, mount my ub as a root and unmount it as a root. Never mount it as a user before. My friend give me the solution using this command to mount my usb

mount -t vfat -o umask=000 /dev/sdb1 /mnt/usb
before this I only used the command
mount -t vfat /dev/sdb1 /mnt/usb

The man pages tell something. YES. but what realy "-0" after vfat means? and umask=000, why must this value be "000"?Simple explaination maybe OK, but the man pages...hahah..maybe its just me getting headace try to understand what it means...anyway linux is all about permission to access files ..it must have something to do with it...Thanks for your earlier reply anurup..I appriciate it a lot .Bye..
 
Old 06-07-2005, 11:02 PM   #4
zakidad
LQ Newbie
 
Registered: Aug 2004
Location: Serdang
Distribution: none
Posts: 26

Original Poster
Rep: Reputation: 15
The solution seems to be fine to change the permission number that viewed from the command ls -l in usb directory. Seems all the value is 777. But when I tried to write to the usb directory, it sayz that
Error "Read only file system"
This start to make me more confuse..
From what you mentioned before, there is no umask parameter in the /etc/fstab file. It shown as:

# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
#/dev/fd0 /media/floppy auto pamconsole,fscontext=system_ubject_r:removable_t,exec,noauto,managed 0 0
/dev/hdb /media/cdrom1 auto pamconsole,fscontext=system_ubject_r:removable_t,ro,exec,noauto,managed 0 0
/dev/sdb1 /media/usbdisk vfat pamconsole,noatime,sync,fscontext=system_ubject_r:removable_t,exec,noauto,managed 0 0
/dev/fd0 /media/floppy1 auto pamconsole,fscontext=system_ubject_r:removable_t,exec,noauto,managed 0 0

Can U help me?
 
Old 06-08-2005, 02:09 AM   #5
anurup
LQ Newbie
 
Registered: Nov 2004
Location: India
Distribution: Fedora Core 4 Test 3
Posts: 14

Rep: Reputation: 0
zakidad

The -o just means that there are (comma separated) options following that parameter.

Try umask=0222. The value is in octal and would give you the reverse of the seeming permissions that it sets. This also means that umask=0000 should give you full access.

Last but not least, check to see if you haven't accidentally turned on the write protection tab on your usb drive...
 
Old 06-08-2005, 02:10 AM   #6
anurup
LQ Newbie
 
Registered: Nov 2004
Location: India
Distribution: Fedora Core 4 Test 3
Posts: 14

Rep: Reputation: 0
You could also try modifying your friend's suggestion to

mount -t vfat -rw -o umask=000 /dev/sdb1 /mnt/usb

(The -rw would specify read-write)
 
Old 06-08-2005, 02:37 AM   #7
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Your /dev/sdb1 is already in your fstab. Why are you assigning it another mount point. You have it as noauto so you will have to mount, however, you should be able to mount it using the parameters in fstab with:

# mount /media/usbdisk

/dev/sdb1 /media/usbdisk vfat pamconsole,noatime,sync,fscontext=system_ubject_r:removable_t,exec,noauto,managed 0 0

KC
 
Old 06-08-2005, 08:17 AM   #8
zakidad
LQ Newbie
 
Registered: Aug 2004
Location: Serdang
Distribution: none
Posts: 26

Original Poster
Rep: Reputation: 15
Thanks...well, there is not much different when it mount automatically at /media/usbdisk and when I mount it at /mnt/usb/ . I tried both and still, all files inside my usb drive are read only files. For
mount -t vfat -rw -o umask=000 /dev/sdb1 /mnt/usb
The access turns back to 755. Altough I mount as a root, still cannot access it. And same to for umask=022
And there is no write protection tab on my usb drive. Thanks for the reminder. If you guys need any extra info about what would cause the problem just ask me for it. I hope we can solve this together.
Dat
 
Old 06-08-2005, 08:36 AM   #9
anurup
LQ Newbie
 
Registered: Nov 2004
Location: India
Distribution: Fedora Core 4 Test 3
Posts: 14

Rep: Reputation: 0
zakidad,

Guessing like a maniac now. Things could sound stupid. Bear with me...

1) Another thing cropped up in my mind. Check the individual file permissions on the usb drive. Maybe they got changed accidentally? What do they say? Do you have read/write permissions for those? Try chmod -R 777 /mnt/usb to try and recursively change the file permissions.

2) Did you try mounting it as a non-root user and see if you have the same problem?
 
Old 06-19-2005, 08:16 AM   #10
zakidad
LQ Newbie
 
Registered: Aug 2004
Location: Serdang
Distribution: none
Posts: 26

Original Poster
Rep: Reputation: 15
Hi all.
Well. Before I start anything, theres something even worst just happen. My thumdrive can be mounted but in a condition where it is write protected. even formating it is useless.
Any Idea?

[root@zaki /]# mount -t vfat -o umask=000 /dev/sdc1 /mnt/usb/
mount: block device /dev/sdc1 is write-protected, mounting read-only

Thanks for any help. Bye
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
K3B and drive permission lmanwarren Linux - Software 2 03-30-2005 09:57 PM
cd drive: permission denied aje Slackware 5 11-11-2004 09:50 PM
USB drive using different partitions (usb key thumb drive) Arodef Linux - Hardware 0 08-04-2004 07:36 PM
Got r/w permission to Windows Drive, except... gamb8 Linux - Newbie 4 07-21-2004 12:09 PM
how do i get permission for my drive? ruwach Linux - Hardware 6 06-12-2004 11:37 PM


All times are GMT -5. The time now is 04:03 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration