Linux Lite Forums

Hardware - Support => Hard Drives and SSDs => Topic started by: javier_mina on January 20, 2015, 07:09:30 PM

Title: [SOLVED] USB stick automounts but cannot change Read Write permissions
Post by: javier_mina on January 20, 2015, 07:09:30 PM
Hello

I'm new to Linux and Linux Lite and really impressed so far.  My problem is that I cannot seem to be able to change the Read Write permissions on a USB stick permissions for Group and Others from NONE to READ AND WRITE.  I installed Disk Utility and formatted the drive and volume to FAT, but no joy.  What am I missing?  Can you please help?

Thanks, Javier

[attachment deleted by admin]
Title: Re: USB stick automounts but cannot change Read Write permissions
Post by: gold_finger on January 21, 2015, 12:21:48 PM
Are you saying that you (main user) can read and write to the USB, but others can not?

Or are you trying to change permissions with the "chown" or "chmod" commands?

With a FAT formatted USB there shouldn't be any problems reading/writing to it.  Linux permissions don't apply to FAT formatted devices.  Does the USB stick itself have some kind of write protection feature that can be turned on/off?  Maybe that's what is happening.

With USB stick plugged-in and auto-mounted, open a terminal and post back with output of these two commands if still having problems:
Code: [Select]
ls -l /media
ls -l /media/yourusername
(Change "yourusername" to your actual username.)
Title: Re: USB stick automounts but cannot change Read Write permissions
Post by: javier_mina on January 21, 2015, 04:57:26 PM
 Thanks very much for your response.  There is no protection at play and it happens with most of my USB sticks.  Here is the output:

steve@steve-Aspire-one:~$ ls -l /media
total 8
drwxr-xr-x 2 root  root  4096 Jun 21  2013 cdrom
drwx------ 3 steve steve 4096 Dec 31  1969 New Volume
steve@steve-Aspire-one:~$ ls -l /media/steve
ls: cannot access /media/steve: No such file or directory
steve@steve-Aspire-one:~$
 
The other puzzling aspect is that I can write and delete files; however, after delete, they " disappear" on the file listing using Thunar, but still occupy space on the stick and show as number of files under properties.  That's why I tried reformatting as FAT using the Disk Utility.

Hopefully you can help.

Title: Re: USB stick automounts but cannot change Read Write permissions
Post by: gold_finger on January 21, 2015, 07:50:53 PM
I'm still unclear what the problem is.  What exactly is it that you are trying to do with regards to permissions?  Give general example please.

A FAT formatted USB will not accept setting permissions like an Ext4 (Ext3, Ext2) formatted volume.  All users should be able to read and write to the USB stick by default if it's formatted with FAT32 (FAT16, etc.).

As for files disappearing from view?  It's possible that they are ending up in the Trash folder on the USB stick instead of actually being deleted, which might explain why you say the number of files being reported on disk doesn't change.

Plug USB back in, open file manager and navigate to USB stick.  Type Ctrl+H, or click View -> Show Hidden Files.  Look to see if there is a hidden folder (likely) called ".Trash-1000".  If there is, just go to your Trash bin (probably shown on left side of Thunar) and empty the trash (File -> Empty Trash).  That should get rid of the stuff in ".Trash-1000" on the USB stick as well as other things that ended up in trash from other deletes you've done elsewhere.
Title: Re: USB stick automounts but cannot change Read Write permissions
Post by: altman on January 21, 2015, 08:03:38 PM
Looks like he s either try to install something from it or have access to some files .
Title: Re: USB stick automounts but cannot change Read Write permissions
Post by: javier_mina on January 21, 2015, 10:51:46 PM
My thanks to gold_finger for the easy solution.  I simply wanted to clean up USB sticks and make the space available.  I am embarrassed that I did not think about hidden files on USB sticks.  Anyhow, using Thunar, I was able to CUT the files from trash-1000 and then empty the TRASH to get the empty space I needed.

Muchas gracias