
Announcement
Collapse
No announcement yet.
Chmod grrrr
Collapse
X
-
Re: Chmod grrrr
You're aware that you can do this in the GUI, right? Go to the file's properties and tick the right read/write boxes until it shows 777."We have offered them (the Arabs) a sensible way for so many years. But no, they wanted to fight. Fine! We gave them technology, the latest, the kind even Vietnam didn't have. They had double superiority in tanks and aircraft, triple in artillery, and in air defense and anti-tank weapons they had absolute supremacy. And what? Once again they were beaten. Once again they scrammed [sic]. Once again they screamed for us to come save them. Sadat woke me up in the middle of the night twice over the phone, 'Save me!' He demanded to send Soviet troops, and immediately! No! We are not going to fight for them."
-Leonid Brezhnev (On the Yom Kippur War)
-
Re: Chmod grrrr
if you're not the owner of that folder, you can't change permissions like you want...
the command is chmod [special][owner][group][others]
So each digit affects rights for particular user or set of users...
4 = read
2 = write
1 = allow execution or parsing the contents of the folder
So if you say 6, that's 4+2 which means allow to read or write in the file, but if the entry is a folder, you can't view the contents (no parsing of contents).
So chmod 777, that means :
owner can write, read and parse contents,
the users in the group the user who created the file/folder is in can read/write/parse folder
everyone can write, read, parse contents
The special is a forth digit which basically says:
4000 (the set-user-ID-on-execution bit) Executable files with this bit set will run with effective uid set to the uid of
the file owner. Directories with the set-user-id bit set will force all files and sub-directories created in them to
be owned by the directory owner and not by the uid of the creating process
2000 (the set-group-ID-on-execution bit) Executable files with this bit set will run with effective gid set to the gid of the file owner.
1000 (the sticky bit) See chmod(2) and sticky(8).
You don't care about those.
--
If you michel are not a root user, you can't change permissions to allow any user to parse the folder or write in it.
You must first use the sudo command to elevate your permissions to the ones of a root user and then you can set whatever permissions you want for that folder.
The whole man page is here: http://www.manpagez.com/man/1/chmod/
Oh... this is probably much better at explaining than me: http://catcode.com/teachmod/Last edited by mariushm; 01-23-2012, 09:55 AM.
Comment
-
Re: Chmod grrrr
Originally posted by shovenose View PostAnd you're aware I'm on Ubuntu Server which as no GUI?
Midnight Commander is a great file manager similar to Norton Commander from the old DOS days.
Install MC. At the command prompt type:
sudo apt-get mc
To run MC with root privileges, at the command prompt type:
sudo mc
To run MC as a regular user, at the command prompt type:
mc
(Much safer but you won't be able to edit system files)
Comment
Comment