A Unix tool for changing file permissions
Questions tagged [chmod]
248 questions
4
votes
1 answer
chmod -R 777 on PXE server - why
So I am following a guide to set up a PXE server, for reference here are the links:
Actual PXE setup
NFS PXE setup
Live-cd PXE setup:
Now throughout these guides he keeps running the chmod -R 777 . I have already gone through this…

dusz
- 155
- 4
4
votes
4 answers
Allow PHP to write file without 777
I am setting up a simple website on webspace provided by my university. I do not have database access so I am storing all the data in a flat file. The issue I am experiencing is related to file permissions. I need PHP to be able to read and write…

camerongray
- 41
- 1
- 1
- 2
4
votes
2 answers
setfacl equivalent to chmod for setting/unsetting individual flag
Using setfacl command line arguments, is there a way to set/unset a single flag as the following command will do ?
chmod g+x FILE
Please note that:
setfacl g::x FILE
setfacl g::--x FILE
are equivalent and will set executable bit and remove read…

vaab
- 532
- 4
- 14
4
votes
4 answers
How to restore remote access to a RHEL system from expanded permissions set over the entire filesystem?
Cause of the problem
I intended to add group write permission on hidden files like '.hgignore' with the following:
# pwd
/opt
# sudo chmod -R g+w .*
The problem is that '..' matched this pattern, and now the entire RHEL filesystem has g+w set. The…

Joshua Berry
- 141
- 4
4
votes
1 answer
File permission mask/mode settings for Samba on FreeNAS?
I'm currently working on the Samba settings on a FreeNAS server. When any user creates a file or a folder on the server I want the file or folder to get the following RWX permissions:
Folders: drwxrws---
Files: -rwxrws---
To set the permissions…

tkahn
- 141
- 1
- 4
4
votes
4 answers
Why is it so important to remove 777 permissions?
I'm writing installer for my PHP web app. It requires user to change permissions of a few files and directories (config.php, cache, uploads, .htaccess) to 777 (so that it's writable). I've seen in many applications that installer requires user to…

radex
- 155
- 1
- 5
4
votes
1 answer
Only allow a user to CHMOD and CHOWN in their home directory or a specified directory
I have a Windows user on my network who has Samba access to our linux development server. Occasionally permissions or ownership will become confused for reasons unknown and he will no longer be able to edit files.
To get round this I have given him…

Treffynnon
- 249
- 4
- 12
4
votes
3 answers
Conflicts between ACLs and umask
I have a directory which can be read and written by a couple of unix groups. This is achieved by using ACLs. Let's assume I did it like this:
mkdir /tmp/test
setfacl -d -m g:group1:rwx /tmp/test
Works great, the whole group (And other groups I add…

kayahr
- 313
- 4
- 14
4
votes
1 answer
Undoing chmod 777
Sometimes in desperation, to test if my problem is not the permission problem I do:
sudo chmod -R 777 mydir/
In most cases it does not helps, and now I have two problems ;)
Files inside mydir/ had different permissions and owners each, and now I…

takeshin
- 1,471
- 3
- 21
- 28
4
votes
2 answers
Is chmod 700 on a directory sufficient to prevent arbitrary access to subdirectories?
If I chmod 700 the the home directory of a user (on Linux), does this guarantee that other non-privileged users cannot access any subdirectory or file under that home directory? Or are there sneaky exceptions to this?
Just to be concrete, if I…

recampbell
- 245
- 1
- 3
- 6
4
votes
2 answers
Accidential CHMOD 755
Alright, I accidentially chomdded everything to 755, which isn't as terrible as chowning everything to the local user. How insecure is this and how would I restore it easily, without reinstalling?

Nik
- 219
- 2
- 5
4
votes
1 answer
Is CHMOD 775 safe to use?
I know it's not good to use CHMOD 777, but is 775 as dangerous? Does it provide a backdoor to hackers as easily as 777?
iamdadude
4
votes
3 answers
chmod -R 777 / on ubuntu - numerous problems
A client has accidentally given the entire filesystem full permissions on their ubuntu 10.04 box.
chmod -R 777 httpdocs/cd /
As you can see they attempted to cd to the root, and instead gave chmod a fun parameter to play with.
First sign of the…

ncatnow
- 141
- 1
- 1
- 3
4
votes
3 answers
CHMOD To Prevent Deletion Of File Directory
I have some hosting on a Linux server and I have a few folders that I don't ever want to delete. There are sub folders within these that I do want to delete.
How do I set the CHMOD permissions on the folders I don't want to delete?
Of course, when I…

Fenton
- 224
- 2
- 4
- 15
4
votes
2 answers
what chmod and owner:group settings are best for a web application?
we are configuring a PHP web application on CentOS and have all our files currently in /var/www/html/project/
Apache is configured to run as apache:apache and has access to the directory above. Right now our files and directories have the following…

solsol
- 1,121
- 8
- 21
- 31