LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MDK 10.x - Mount USB Pen OK, But no permission to write (https://www.linuxquestions.org/questions/linux-software-2/mdk-10-x-mount-usb-pen-ok-but-no-permission-to-write-325255/)

Xolo 05-20-2005 01:22 AM

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

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

Xolo 05-20-2005 03:09 AM

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.

Xolo 05-20-2005 05:19 AM

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.


All times are GMT -5. The time now is 03:48 PM.