Follow

CHMOD help, please?
installed GNUsoc on a subdomain on my site, instructions say to set up permissions on certain directories with "chmod g+w" - unfortunately, I don't have SSH access, and Filezilla only accepts octals - so would the equivalent be setting perms to 020?
Or am I reading this entirely wrong?

@stuartb probably 770 (rwxrwx---) if it's a data directory. +w means you *add* write permission, so if you only had read permission before you just add it to the number.

Read = 4
Write = 2
eXecute = 1

See also `man chmod`.

@stuartb I *think* "g" means "do this to all three", so I *think* the octal would be 222 (assuming that's octal for "-w---w---w--").

Are these write-only logfiles or something? That's the only reason I can think of for not also giving read access.

The chmod manpage, meanwhile, is a perfect example of what's wrong with manpages in general. It lists all the mode-letters but tells you *nothing* about what they mean.

@stuartb Caveat: I'd make a note of what the permissions are now. If this doesn't work, it may be that you were just supposed to *add* those three bits and leave the rest as they were.

@woozle It's for a couple of data directories - specifically, /file and /avatar, for uploads (images, etc) and user icons respectively.
(Lets leave aside the fact that the instructions omit any mention of CREATING these directories in the first place!)
Anyhoo, I created them with Filezilla, and it appears to work with default perms (644), I'm just not sure this is the most secure way of going about it. (cont)

@woozle From the reading I've been doing (which is clear as mud - the only link I found which gave anything like a coherent answer was only marginally helpful), it would appear that the mnemonic to remember is UGO (PLEASE tell me the card game isn't related!) (User, Group, Others) - g+W would indicate giving write permission on to the group, which would be 020 (I think) - unless it is adding it to the default perms, which would be 664...
My head hurts...

@stuartb
I remember UGO from having seen it spelled out in various interfaces, but you may be right that the g is "group" rather than "global".

Isn't the card game "Uno"?

@woozle I was thinking of the card games (and computer games. And cartoons. And More.), all based on the manga Yu-Gi-Oh.
Thankfully, there is no connection. :D

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!