ZoneO-tips for Mandriva Linux

Changing default permissions

It seems that all files created in a Mandriva distribution are world-readable, but I don't like that! How do I change the default file permissions in Mandriva?

 
 

Well, by default, the permissions of files created with Mandrake are

-rw-r--r--
that is
  • the owner can read, and overwrite it,
  • the users who are member of the same group than the owen can read it,
  • the other users can read it as well.
How do you know this? Well, type ls -l in a shell (or konsole). In graphical mode (konqueror for instance), right-click on the file, click on properties in the menu, and then choose the permission tab.

To change those permissions, you can use the command chmod, or, in graphical mode, this same permissions tab.

Now, here is the real problem. You might want the default permissions on newly created file to be:

-rw-------
which means
  • the owner can read and overwrite it,
  • the other members of the group can not do anything,
  • the outside world can not do anything.
In order to do so, you have to start the control center, then the security tab, the Levels and checks icon, the System options tab... and change the value on the the last line: User umask. In my case, I had to change it to 066...

Why 066? Well, it would take me hours to explain this, so I'll just give a few links:

Good luck!

And if you need a little help for all those unix commands, I really recommend the book Unix in a Nutshell. It's really good, with a nice summary of the most important Unix commands, shell references, and all those things you keep forgetting about sed, regular expressions, or vi.

01/2005
Edited and reformatted 10/2005
 

Nex, 11 October 2007

"Why 066? Well, it would take me hours to explain this"

Hours? It's simple.

You just substract logical sum from 666 (rw-rw-rw-) for files and from 777 (rwxrwxrwx) for catalogs.

Default umask for every user is 022, so 666 - 022 = 644 (rw-r--r--).

Your example: 666 - 066 is 600 (rw-------). If you want to have a catalog rwx---r-x you set umask 072, because:

777 - 072 = 705 (rwx---r-x). It's simple :)

Butchu, 12 October 2007

Thanks for taking the time to make this clear!

FranMcintyre26, 12 July 2010

Have no money to buy a building? Don't worry, because that is achievable to take the <a href="http://bestfinance-blog.com/topics/personal-loans">personal loans</a> to work out such kind of problems. Thence get a credit loan to buy all you need.

ConcordWatches, 12 August 2010

Specializing in <a href="http://www.replicawatchesmart.com/"><stron...[/link]">Swiss Replica Watches</a>, <a href="http://www.replicawatchesmart.com/">Cheap Wat...[/link]">Wholesale Watches</a>, <a href="http://www.replicawatchesmart.com/rolex-watches-c-32.html[/l..."><strong>A.Dunhill Watches</strong></a>, <a href="http://www.replicawatchesmart.com/alangesohne-watches-c-180....">A.Lange&Sohne Watches</a>, <a href="http://www.replicawatchesmart.com/alain-silberstein-watches-...">Alain Silberstein Watches</a>, <a href="http://www.replicawatchesmart.com/audemars-piguet-watches-c-...">Audemars Piguet Watches</a>, <a href="http://www.replicawatchesmart.com/brm-watches-c-151.html[/li...">Baume & Mercier Watches</a>, <a href="http://www.replicawatchesmart.com/bellross-watches-c-36.html...">Bell&Ross Watches</a>, <a href="http://www.replicawatchesmart.com/blancpain-watches-c-183.ht...">Blancpain Watches</a>, <a href="http://www.replicawatchesmart.com/bmw-watches-c-31.html[/lin...">Breguet Watches</a>, <a href="http://www.replicawatchesmart.com/breitling-watches-c-28.htm...">Breitling Watches</a>, <a href="http://www.replicawatchesmart.com/index.php?main_page=news_a...">Replica Watches</a>, <a href="http://www.replicawatchesmart.com/burberry-watches-c-86.html...">Burberry Watches</a>, <a href="http://www.replicawatchesmart.com/bvlgari-watches-c-76.html[...">Calvin Klein Watches</a>, <a href="http://www.replicawatchesmart.com/carl-f-bucherer-watches-c-...">Carl F. Bucherer Watches</a>, <a href="http://www.replicawatchesmart.com/cartier-watches-c-90.html[...">Chanel Watches</a>, <a href="http://www.replicawatchesmart.com/chopard-watches-c-71.html[...">Christian Dior Watches</a>, <a href="http://www.replicawatchesmart.com/chronoswiss-watches-c-190....">Chronoswiss Watches</a>, <a href="http://www.replicawatchesmart.com/concord-watches-c-156.html...">Concord Watches</a>, <a href="http://www.replicawatchesmart.com/corum-watches-c-100.html[/...">D&G Watches</a>, <a href="http://www.replicawatchesmart.com/de-witt-watches-c-127.html...">De Witt Watches</a>, <a href="http://www.replicawatchesmart.com/esprit-watches-c-218.html[...">Ebel Watches</a>, <a href="http://www.replicawatchesmart.com/emporio-armani-watches-c-1...">Emporio Armani Watches</a>, <a href="http://www.replicawatchesmart.com/fendi-watches-c-157.html[/...">Ferrari Watches</a>, are given the correct care and treatment. <a href="http://www.replicawatchesmart.com/fossil-watches-c-225.html[...">Franck Muller Watches</a>, <a href="http://www.replicawatchesmart.com/girard-perregaux-watches-c...">Girard Perregaux Watches</a>, <a href="http://www.replicawatchesmart.com/glashutte-watches-c-158.ht...">Glashutte Watches</a>, <a href="http://www.replicawatchesmart.com/graham-watches-c-16.html[/...">Gucci Watches</a>, <a href="http://www.replicawatchesmart.com/guess-watches-c-17.html[/l...">Hamilton Watches</a>, <a href="http://www.replicawatchesmart.com/harry-winston-watches-c-16...">Harry Winston Watches</a>, <a href="http://www.replicawatchesmart.com/hermes-watches-c-18.html"><strong>Hermes Watches</strong></a>, For a long period of time she had been demanding one of those expensive watches that she had seen in an exclusive showroom.

Add a comment

Name:
Email or URL: (optional)
Security code
Code shown above:
 
 
© ZoneO-soft - Contact us - Start page