LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 10-05-2005, 08:29 AM   #1
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,834

Rep: Reputation: 47
USB Stick on Debian-Etch 2.6, write is disabled


OK I normally mount my usb-stick 128MB with
Code:
# mount -t auto -o users,defaults /dev/sdb1 /media/usbdisk
It mounts OK, but read only! When I mount it on SuSE and SlackwareI CAN write on it. On Debian, however writing is disabled. Anyone has thoughts?

Last edited by SlackerLX; 10-05-2005 at 08:30 AM.
 
Old 10-05-2005, 01:29 PM   #2
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 45
hi there,
what
Code:
mount -t auto -o users,defaults,umask=0777 /dev/sdb1 /media/usbdisk
gives?
regards,
slackie1000
 
Old 10-05-2005, 02:38 PM   #3
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,173

Rep: Reputation: 47
umask would be my idea, too, but that one is not right. It'll set permissions to 000.

Try
mount -t auto /dev/sdb1 /media/usbdisk -o gid=100,umask=002

That's how I always mount mine so that the users group is allowed with 0755 permissions.
 
Old 10-05-2005, 02:57 PM   #4
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,834

Original Poster
Rep: Reputation: 47
Thanks guys!
The second version worked! Only in root though, but it matters not, cause It IS write-possible
Code:
Debian:/home/slackerlx# mount -t auto /dev/sdb1 /media/usbdisk -o gid=100,umask=002
Debian:/home/slackerlx# cp drivel-2.0.2.tar.gz  /media/usbdisk
Debian:/home/slackerlx# cd /media/usbdisk/
Debian:/media/usbdisk# ls
???? ????? ???? 2005.xls                           drivel-2.0.2.tar.gz
3.5 ED Players Handbook.pdf                        dww20051003.mp3
AdbeRdr60_enu_full.exe                             Electricity.xls
ag322.exe                                          Notice to personnel.pdf
avwinsfx.exe                                       Oct1.pdf
cleaning.pdf                                       Oct2.sxw
D&D_3_5_Automated_Character_Sheet-v5_1_3.pdf       pic
D&D 3.5 Deluxe Player Character Sheets (2003).pdf  vdf_h.zip
Debian:/media/usbdisk#
First version with "umask=0777" didn't work unfortunately. "contents can't be displayed" bla-bla...
 
Old 10-05-2005, 03:14 PM   #5
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,173

Rep: Reputation: 47
Probably adding "users" to the -o parameter will allow users to mount. I do all my mounting as root with su -c so I don't use the users option, but it should be like this

-o users,gid=100,umask=002
 
Old 10-05-2005, 03:27 PM   #6
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,834

Original Poster
Rep: Reputation: 47
Negative, commander!
---------------------------------------------------------------------------
slackerlx@Debian:~$ su
Password:
Debian:/home/slackerlx# mount -t auto /dev/sdb1 /media/usbdisk -o users,gid=100,umask=002
Debian:/home/slackerlx# exit
exit
slackerlx@Debian:~$ cp liveeasy /media/usbdisk
cp: cannot create regular file `/media/usbdisk/liveeasy': Permission denied
slackerlx@Debian:~$
-------------------------------------------------------------------------------

Last edited by SlackerLX; 10-05-2005 at 04:20 PM.
 
Old 10-05-2005, 04:11 PM   #7
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,834

Original Poster
Rep: Reputation: 47
Interesting that if I boot with USB-stick inside the port it's writable even with user. Here is what dmesg has spat out:
-----------------------------------------------------------------------------------------------------
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 6 ports detected
usb 3-6: new high speed USB device using address 2
Initializing USB Mass Storage driver...
scsi2 : SCSI emulation for USB Mass Storage devices
Vendor: USB Model: BAR Rev: 2.00
Type: Direct-Access ANSI SCSI revision: 02
sdb: Unit Not Ready, sense:
Current : sense key Unit Attention
Additional sense: Not ready to ready change, medium may have changed
SCSI device sdb: 256000 512-byte hdwr sectors (131 MB)
sdb: assuming Write Enabled
sdb: assuming drive cache: write through
/dev/scsi/host2/bus0/target0/lun0: p1
Attached scsi removable disk sdb at scsi2, channel 0, id 0, lun 0
USB Mass Storage device found at 2
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
--------------------------------------------------------------------------------------------

Last edited by SlackerLX; 10-06-2005 at 12:49 AM.
 
Old 10-06-2005, 06:30 AM   #8
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 45
hi there,
Quote:
Originally posted by SlackerLX
First version with "umask=0777" didn't work unfortunately. "contents can't be displayed" bla-bla...
sorry SlackerLX... bad tip from my part..
i use umask=0077 in my fstab.. user mount right only...
sorry again for the bad call.
regards,
slackie1000
 
Old 10-06-2005, 03:51 PM   #9
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,834

Original Poster
Rep: Reputation: 47
Negative slackie1000!
http://slackerlx.blogspot.com/
the last post (temporary)
 
Old 10-07-2005, 01:10 AM   #10
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 45
hi there,
thanks for the link, SlackerLX...
weird.. i followed this external thread and with this option in fstab is working ok. maybe i misunderstood something about your problem? sorry again for tha bad call.
regards,
slackie1000
 
Old 10-07-2005, 02:08 AM   #11
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,834

Original Poster
Rep: Reputation: 47
Quote:
Originally posted by slackie1000
sorry again for tha bad call.
regards,
slackie1000
Hey, friend!
You've nothing to apologize for !
You try to help. I try to TEST. Debian is also little strange to me yet. Thank you for giving me codes to play with. As you probably saw in the blog, I'm not completely confident that I'm keeping Debian as my #1 Desktop Use.
 
Old 10-07-2005, 07:26 AM   #12
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,173

Rep: Reputation: 47
After looking at your fstab, it looks to me like your granting ownership of the sda1 device to the root group. I haven't used a uid parameter, especially not in conjunction with a gid. Try changing the gid from root to users and see what happens.

Slackie 1000, this is how umasks work and why your suggestion doesn't work.

start wth 777
subtract
umask 777
equals
0000 effective (no permission for anyone!)

OR
777
subtract
077
equals
700 effctive (rwx for owner only)

So a good one is
777
subtract
002
equals
775 effective (rwx for owner and group, and rx for everyone else)
 
Old 10-08-2005, 01:41 AM   #13
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,834

Original Poster
Rep: Reputation: 47
Quote:
Originally posted by dracolich
After looking at your fstab, it looks to me like your granting ownership of the sda1 device to the root group. I haven't used a uid parameter, especially not in conjunction with a gid. Try changing the gid from root to users and see what happens.
gid=users
I couldn't see difference. RW - OK. Boot at startup - OK

Last edited by SlackerLX; 10-08-2005 at 01:43 AM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Stick reads but won't write jaws_tas Linux - Hardware 3 09-23-2005 12:36 AM
mount/umount usb stick - PQI Intelligent Stick 2.0 sandbag Linux - Software 5 05-06-2005 11:12 AM
Debian base installed to usb stick, doesn´t boot boolean Debian 6 02-22-2005 12:41 AM
Can't WRITE to USB stick, Mount OK NO WRITE! ClericPreston Linux - Newbie 4 12-04-2004 10:43 AM
write protect freezes my usb stick db391 Linux - Hardware 3 09-25-2004 04:43 AM


All times are GMT -5. The time now is 02:21 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration