LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-05-2006, 08:30 PM   #1
thelonius
Member
 
Registered: Aug 2005
Location: Montréal
Distribution: Debian Testing, Slackware 10.2
Posts: 136

Rep: Reputation: 15
'chnod' doesn't work with flash usb


Hello,

I mount flash usb disk with 'mount /dev/sda1 /mnt/flash' as root, all others can read and execute, but not write in this directory. When i run 'chmod a+wrx', the rights remain the same.

What's wrong ?

Thank you.
 
Old 10-05-2006, 08:43 PM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Did you unlock the write-protection (switch) on the usb disk?
 
Old 10-05-2006, 08:48 PM   #3
thelonius
Member
 
Registered: Aug 2005
Location: Montréal
Distribution: Debian Testing, Slackware 10.2
Posts: 136

Original Poster
Rep: Reputation: 15
lol

in fact, i can write when i'm root

this is what i'm doing - i prepare data as normal user, but then copy it as root
 
Old 10-05-2006, 08:58 PM   #4
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Try
Code:
chmod 777 /mnt/flash
ls -l /mnt/flash
Should work...
 
Old 10-05-2006, 09:02 PM   #5
thelonius
Member
 
Registered: Aug 2005
Location: Montréal
Distribution: Debian Testing, Slackware 10.2
Posts: 136

Original Poster
Rep: Reputation: 15
oups... is '777' really different from 'a+wrx' ?...

anyway, it doesn't work
 
Old 10-05-2006, 09:59 PM   #6
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
No, it's equal. Strange it didn't work, it's the least restrictive set of permissions on a file. What did the ls -l command tell you?
 
Old 10-09-2006, 08:45 PM   #7
thelonius
Member
 
Registered: Aug 2005
Location: Montréal
Distribution: Debian Testing, Slackware 10.2
Posts: 136

Original Poster
Rep: Reputation: 15
in both cases (before and after 'chomod') it's

drwxr-xr-x 5 root root 8192 1969-12-31 19:00 flash
 
Old 10-09-2006, 09:15 PM   #8
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Is the filesystem on the USB device vfat? If so chmod won't work, vfat doesn't support unix-like permissions. umount the device, then chmod /mnt/flash and use the umask option when mounting to allow users to write to the device.
 
Old 10-09-2006, 09:28 PM   #9
thelonius
Member
 
Registered: Aug 2005
Location: Montréal
Distribution: Debian Testing, Slackware 10.2
Posts: 136

Original Poster
Rep: Reputation: 15
I'm not sure about the filesystem - I mount with 'mount /dev/sda1 /mnt/flash'

'/mnt/flash' is 'drwxrwxrwx' before mount, and 'drwxr-xr-x' after mount.

should I format disk to ext2 ?
 
Old 10-09-2006, 11:02 PM   #10
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
When it's mounted you can type 'mount' into a terminal to see the filesystem. If you change it to ext3 (ext2 = only if necessary) then it won't be accessible in 99.4% of Windows machines so if you wanted to share something you're killing your chances. Using the umask option will work fine for you and let you stay with vfat, check Google for exact usage but it's very easy
 
Old 10-09-2006, 11:10 PM   #11
thelonius
Member
 
Registered: Aug 2005
Location: Montréal
Distribution: Debian Testing, Slackware 10.2
Posts: 136

Original Poster
Rep: Reputation: 15
thanks

hope it helps
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
work with USB flash disk in RH lieuquocdat Linux - Hardware 3 07-13-2006 06:57 AM
udev, USB Flash Drives, and usb-mount talkingwires Debian 13 11-07-2004 12:15 PM
Yet another USB/Flash Memory can't get to work problem maddogdelta Linux - Hardware 7 05-15-2004 05:06 PM
I want my Flash (USB) Drive to work! NauticX Linux - Hardware 7 12-15-2003 05:15 PM
Need a little help getting USB flash card reader to work Electrode Linux - Hardware 13 10-20-2003 04:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:02 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