D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Permissions are a pain (SOLVED)

 

On 28/06/14 22:43, Neil Winchurst wrote:

>I am a Linux only user for 15 years now

Holy crap, that's longer than me... *you* should be telling me how to
fix things by now surely :]

> Thanks, that worked.

Glad to help.

>I assume the -R is recursive and -v is verbose

Your 15 years experience is already showing - right first time :]

> sudo chown neilwin /media/neilwin/usb-device

>From man chown: "If only an owner (a user name or numeric user ID) is
given, that user is made the owner of each given file, and the files'
group is not changed."

Note the 'given file' - your original command didn't operate
recursively, although you should have been able to create/delete files
in the usb drives' TLD after that. Maybe you were trying unsuccessfully
to use the GUI to operate in subdirectories afterwards, which at that
point hadn't inherited the parent directory's new permissions so would
have naturally failed.

>did not get any error messages

You know how *nix works - no feedback means the command worked, for
certain values of 'worked'. Well, the command returned an exit code of
0, for whatever that may be worth.  Out of pure habit I append ' -v' to
almost every command I type in a shell so I get a bit more information
about what on earth is happening.

> Permissions can indeed be a pain.

sudo is there for a reason, just be careful when you bruteforce things.
It is definitely in your best interests to understand *nix permissions -
which are awesome by the way, far *far* better than windows - and I
always point curious people towards this old but excellent tutorial:

http://www.grymoire.com/unix/Permissions.html

Cheers

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq