LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-03-2009, 10:41 AM   #1
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Rep: Reputation: 37
Talking Permissions curiosity...


Hi linuxers...

I am just curious about something that happened to me recently.

I am fairly new to linux and recently i was setting up a user account to use my Xserver (i read is not recommended to startx with root access)...

So... when i try to launch the X I get some complaints about not having permission in the tmp folder (maybe i changed them by mistake) and after getting totally frustrated trying to change the permissions in some folders i got sick of it and did the following:

Code:
# chmod -R 777 /*
the funny part about it is that even though i set up permissions to rwx for everybody then i got the following error when i tried to switch user from root to user:

Code:
# su raptorx
[bin/bash] Permission Denied
I was like WTF??

I had to set the permissions to the default 755 in order to be able to switch users...

Can anybody give me an explanation for that???
If ALL folders are set to 777 how com i get a Permission Denied error??

It is not a problem but im just curious about it.

 
Old 07-03-2009, 10:56 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Quote:
Originally Posted by RaptorX View Post
after getting totally frustrated trying to change the permissions in some folders i got sick of it and did the following:
Code:
# chmod -R 777 /*
I can understand the frustration but help is all around in docs, here and everywhere else on the 'net.
And after seeing you deliberately screw up a system like that I can only say: please use GNU/Linux like it's intended to be used or don't use it at all.

Last edited by unSpawn; 07-03-2009 at 10:57 AM.
 
Old 07-03-2009, 10:58 AM   #3
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
Well, after using this command
# chmod -R 777 /*

it is a problem. Making it 755 "again" doesn't help much. Your system is trashed, I'm not sure that it will boot again. Be warned.
 
Old 07-03-2009, 11:20 AM   #4
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Original Poster
Rep: Reputation: 37


Dont worry about that guys Im posting from that "trashed" system right now.

Everything is working fine and everything is back to the defaults. I can su again and everything...

The thing is... why chmoding to 777 the whole system makes such instability...??

Even though i fixed everything im just curious. I swiched to linux mainly to mess around and learn, I dont mind trashing my system 100 times and reinstalling everything from 0 (which I did enough in Windows, but not because I wanted, it was because that OS sucks from the start).
 
Old 07-03-2009, 11:37 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Quote:
Originally Posted by RaptorX View Post
The thing is... why chmoding to 777 the whole system makes such instability...??
Ownership and access rights together is also called DAC aka Discretionary Access Control. It is one of the most basic and fundamental way of separating privileges. If it cannot be determined from configuration sources running under 'strace' may reveal some applications will check for DAC rights on dirs and files and might for instance decide to put temporary files in alternative locations if access rights are set wrong (GDM for instance). Other applications might just refuse to run regardless (like SSH wrt ~/.ssh access rights).


Quote:
Originally Posted by RaptorX View Post
Even though i fixed everything im just curious. I swiched to linux mainly to mess around and learn, I dont mind trashing my system 100 times and reinstalling everything from 0
Being curious is a good thing but please don't willingly expose a machine to the 'net when it's stripped from basic security features. it's not good for you (if you care) but it's also not good towards other 'net users (that'll be us and we definately care).
 
Old 07-03-2009, 11:57 AM   #6
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by unSpawn View Post
Being curious is a good thing but please don't willingly expose a machine to the 'net when it's stripped from basic security features. it's not good for you (if you care) but it's also not good towards other 'net users (that'll be us and we definately care).
You are right... even though my system at the moment is not stripped from its security because i reinstalled and everything is where its supposed to be (755 i guess right?) before even atepmting to go to the 'net.

I dont understand though how can it be not good towards other users... :S

Quote:
Originally Posted by unSpawn View Post
Ownership and access rights together is also called DAC aka Discretionary Access Control. It is one of the most basic and fundamental way of separating privileges. If it cannot be determined from configuration sources running under 'strace' may reveal some applications will check for DAC rights on dirs and files and might for instance decide to put temporary files in alternative locations if access rights are set wrong (GDM for instance). Other applications might just refuse to run regardless (like SSH wrt ~/.ssh access rights).
If I understand you correctly you are saying that is basically a security measure in case the permissions are set wrong, preventing unauthorized use of some system services, right?? that would make sense then.

Thanks for your replay.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Just a question out of curiosity? HelpMe2877 General 23 08-12-2008 10:17 AM
Curiosity cthomas Linux - Software 2 01-24-2007 10:40 AM
out of curiosity elamigo2004 Linux - Software 1 04-17-2004 04:39 PM
out of curiosity aizkorri General 5 12-15-2003 11:16 AM
Switchbox curiosity rharvey@cox Linux - Hardware 7 11-22-2003 06:43 AM


All times are GMT -5. The time now is 10:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration