LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 05-20-2005, 02:22 AM   #1
Xolo
Member
 
Registered: Jul 2004
Location: The Netherlands
Distribution: Mandrake, Knoppix, Coyote Linux, RedHat
Posts: 354
Blog Entries: 3

Rep: Reputation: 31
MDK 10.x - Mount USB Pen OK, But no permission to write


Good day everyone. been a while since I last visited.
What i'm here for.. and forgive me if it's too long a read.

a little background info;
At work I have a nice P4/2.8Ghz Intel Desktop board workstation I can use and abuse as I see fit. Last time Windows XP crashed (it would keep spawning svchost.exe >200 times) I reinstalled it as a dual boot machine with XP and Mandrake 10. I could happily plug in an USB pen drive and work with it (read and write) without having to alter settings. icon would appear when plugged, and disappear when unplugged. Then I had the brilliant idea to install Gvim, since I like having a GUI to work with. perhaps a bad choice, because when I started to use Split-open to have two files open in Gvim, the trouble started. Gvim would complain about '.filesomething.php.swp already exists!, and promted me with some options among which were to edit anyway, read only, recover or cancel. Either would give the same result, The file I was editing would be corrupted, would disappear off my USB pen, and hence forth Gvim would always complain about existing swapfiles that I can't see anywhere on my system!. If I take the USB pen drive to a Windoze machine after that, I can still read/write the drive, but files would be missing, and Scandisk would barf out the usual found.000 files with garbled leftovers of my precious php files.
Kind of out of annoyance, I wiped out MDK 10 and reinstalled from scratch with MDK 10.1, assuming that something newer would perhaps fix my problems.

Alas;
The Gvim problem persists. still invisible, pre-existing swapfiles on my USB pen.. corrupting files.. buuut.. ls- al doesn't show any hidden files.. yet when you try rm .something.php.swp it asks to delete? yes, then it deletes. if you repeat it will just ask you again, since the file is still there.. shredding doesn't help either. edited file gone, ghost swapfiles everywhere. basicly my favorite tool Gvim has become.. unreliable. or maybe I should employ a different strategy, copy files off the pen into home dir, edit, then copy back? but then I need.. yes, you guessed it: write permission.

To the real problem now however; what I really want to solve first is: Why can MDK 10 dynamically mount an USB pen drive with read/write permissions for normal users, and MDK 10.1 cannot? my USB pen drive is still dynamically mounted, gets a desktop icon, but I don't get write permission because the object is owned by Root. on MDK 10, the object would be owned by the user that plugged it. I don't understand such changes in new releases of distros, but I gather there is some technical reason.

Once I get to work, I will post more relevant information.. since I guess someone would want to see the fstab file from my workstation.

I'll be back..
 
Old 05-20-2005, 04:09 AM   #2
Xolo
Member
 
Registered: Jul 2004
Location: The Netherlands
Distribution: Mandrake, Knoppix, Coyote Linux, RedHat
Posts: 354
Blog Entries: 3

Original Poster
Rep: Reputation: 31
Tailing some stuff from dmesg when the USB Pen is inserted, in case it helps:
Code:
usb 3-1: new full speed USB device using address 8
scsi6 : SCSI emulation for USB Mass Storage devices
  Vendor: GENERIC   Model: USB FLASH DISK    Rev: 1.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sda: 64000 512-byte hdwr sectors (33 MB)
sda: Write Protect is off
sda: Mode Sense: 0b 00 00 08
sda: assuming drive cache: write through
 /dev/scsi/host6/bus0/target0/lun0: p1
Attached scsi removable disk sda at scsi6, channel 0, id 0, lun 0
USB Mass Storage device found at 8
And here is my /etc/fstab (before plugging):
Code:
/dev/hda5 / ext3 defaults 1 1
/dev/hda7 /home ext3 defaults 1 2
/dev/hdc /mnt/cdrom auto umask=0022,user,iocharset=utf8,noauto,ro,exec,users 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0022,iocharset=utf8,sync 0 0
/dev/hda1 /mnt/windows ntfs umask=0022,nls=utf8,ro 0 0
none /proc proc defaults 0 0
/dev/hda6 swap swap defaults 0 0
And here is my /etc/fstab (after plugging):
Code:
/dev/hda5 / ext3 defaults 1 1
/dev/hda7 /home ext3 defaults 1 2
/dev/hdc /mnt/cdrom auto umask=0022,user,iocharset=utf8,noauto,ro,exec,users 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0022,iocharset=utf8,sync 0 0
/dev/hda1 /mnt/windows ntfs umask=0022,nls=utf8,ro 0 0
none /proc proc defaults 0 0
/dev/hda6 swap swap defaults 0 0
/dev/sda1 /mnt/removable auto umask=0022,user,iocharset=iso8859-15,sync,kudzu,codepage=850,noauto,exec,users 0 0
Now after plugging I see /dev/sda1 mounted on /mnt/removable.. owned by Root. as a normal user I get read permission, nothing else.
Please correct me if i wrong, but if the fstab entries are created and subsequently removed when I plug/unplug the pen, how am I supposed to remedy the situation? from what I see now I would expect that anything I do to the line for /dev/sda1 will get wiped out as soon as I unplug the device?

Any ideas would be appreciated.
 
Old 05-20-2005, 06:19 AM   #3
Xolo
Member
 
Registered: Jul 2004
Location: The Netherlands
Distribution: Mandrake, Knoppix, Coyote Linux, RedHat
Posts: 354
Blog Entries: 3

Original Poster
Rep: Reputation: 31
By mere chance I come across this post where Lord Zoltar has cdrw permission problems.. digging through /etc/udev/permissions.d, I do find a section for several types of USB storage devices, but I am unsure which I should change (or if I should change all of them) and to what? they all contain the user and group Root.
 
  


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
read & write USB pen drive?? wrangler Linux - Newbie 5 03-08-2005 04:11 PM
Unable to mount new USB pen erraticassassin Linux - Hardware 10 02-16-2005 03:36 AM
cannot mount usb pen uizzy76 Linux - Hardware 3 12-27-2004 02:11 AM
usb pen drive, it wont let me write to it Mandrake 10 Whiskers Mandriva 9 08-22-2004 03:15 PM
usb pen drive - only root can write? BrianK Linux - Newbie 3 01-29-2004 01:50 AM


All times are GMT -5. The time now is 07:43 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration