WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: usb permissions  (Read 3431 times)

Offline drskandala

  • Newbie
  • *
  • Posts: 2
usb permissions
« on: March 22, 2009, 07:10:10 AM »
Hi,i am using TC(1.2final) in my old P3 laptop as a "downloading" pc.I am using opera as a web browser, emelfm as a file browser and utorrent under wine as a bittorent downloader.I save my downloaded files in a usb stick(fat32 formatted).I am booting the OS using cd disc,then i plug the usb stick,mount /dev/sda1, use winecfg to assign a letter to /mnt/sda1 and then i save the downloaded torrents to the usb stick.
Everything works fine until i unmount the device and disconnect it from the laptop.The next time i plug the usb stick and mount the filesystem i cannot have write access to the drive(utorrent says cannot access file).When i look the permissions for /dev/sda1 with emelfm they are different than before  >:(
When i try to change them, i get an "operation not permitted"
Is there a way when i disconnect/connect the usb stick not to change the write permissions?
Do i have to type an extra option in mount/umount commands? Consider that i am a new user in linux/TC

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: usb permissions
« Reply #1 on: March 22, 2009, 07:31:01 AM »
I believe Wine uses directories in your home directory when doing things like assigning drive letters, and when it does it makes that device writable by the user. Unmounting the device and mounting it again seems to disrupt that.  What I would do if I was using programs under Wine to download with is to save the downloads to a directory and then copy those files to where you want them.  That would be a simpler method that going through Wine to do that.  You could mount your usb stick under your home directory-

mkdir /home/tc/usb
mount /dev/sda1 /home/tc/usb

if you want it to be writable by the user.  I forget what permissions usb drives are mounted with by default, but the above approach should work.

FAT32 does not keep permissions like ext2/ext3, but I don't think that is the cause of what you are seeing.  You are able to write to FAT32, but being unable to execute scripts from a FAT32 partition would be another story.

Offline drskandala

  • Newbie
  • *
  • Posts: 2
Re: usb permissions
« Reply #2 on: March 22, 2009, 08:55:02 AM »
Just tried that and the results are the same.
"Edit" I tested and this happens after i install wine.
When i unplug and replug my usb flash drive i dont have permission to write to it.I know that i can mount it anywhere i want, but wine "must" assign a drive letter to the path, so utorrent can save the downloads.(i think is Z:\ by default , so /home/tc/ becomes Z:\home\tc for windows applications).Also i am not using a hard drive(that is the reason why i want to use TC) so all the downloaded files must directly be saved in the flash drive.
So long i was using a "workaround".I unmounted the flash drive,suspended the laptop to ram and THEN disconnect the flash drive.With this way when i copied/deleted files to the main pc and then reconnect the drive the permissions where unchanged  ;D
This way worked many times, but today eventually it happened again.Any ideas on how to make  permissions work or avoid this to happen?
« Last Edit: March 22, 2009, 10:25:16 AM by drskandala »