File Permissions - Security risk?

Asked by jetbundle

Just for curiosity:
Is it a security risk (or will it cause other problems) if I set the permissions for all the files in my home directory to u+rwx?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Philip Muškovac (yofel) said :
#1

First an explanation what those mean, just in case you don't know ;)
r: readable
w: writable
x: executable

the u means you want to set it for the user/owner of the file. Now afaik the default permissions are -rw-r--r-- . That means you can read and edit the file, people in the same group as you can read it and everybody else can read it. If you set u+rwx
you will get: -rwx-r--r-- . So the only change would be that you make the file executable. (Note that directories are set to executable by default so that you can access them). But you should only mark files as executable if they can be executed. That would be programs and scripts for example. If you set the executable flag for /all/ files you will get the following problems:
- tab-completion will get messed up when you want to execute something in the directory you are in with ./xy since all files are now seen as executable files.
- when you double click an executable text file you will be asked if you want to edit the file or execute it.

So, although there aren't any security problems with doing that you might find it rather inconvenient.

Can you help with this problem?

Provide an answer of your own, or ask jetbundle for more information if necessary.

To post a message you must log in.