Questions tagged [chmod]

A Unix tool for changing file permissions

248 questions
269
votes
2 answers

Why is "chmod -R 777 /" destructive?

This is a Canonical Question about File Permission and Why 777 is "destructive". I'm not asking how to fix this problem, as there are a ton of references of that already on Server Fault (reinstall OS). Why does it do anything destructive at…
samwise
  • 2,393
  • 2
  • 14
  • 9
73
votes
7 answers

How to setup linux permissions for the WWW folder?

Updated Summary The /var/www directory is owned by root:root which means that no one can use it and it's entirely useless. Since we all want a web server that actually works (and no-one should be logging in as "root"), then we need to fix this.…
Xeoncross
  • 4,449
  • 12
  • 43
  • 56
55
votes
1 answer

What does the @ symbol mean in a file's permission settings?

I'm on MacOSX, I did ln -s on a directory and these are the results: -rwxrwxr-x@ 1 shiki admin 970332 Mar 6 16:38 apc.so -rwxrwxr-x@ 1 shiki admin 653884 Mar 6 16:38 eaccelerator.so -rw-rw-r--@ 1 shiki admin 60064 Mar 6 16:38…
Shiki
  • 760
  • 2
  • 6
  • 8
31
votes
1 answer

Which permissions should I set to dhparam.pem?

I am generating Diffie-Hellman parameters for the ssl_dhparam directive in the SSL configuration of nginx. The file dhparam.pem is created with the command openssl dhparam 2048 -check -out dhparam.pem. Which permissions should I set to this file? Is…
Eric Bréchemier
  • 1,435
  • 2
  • 12
  • 8
30
votes
5 answers

chmod not working correctly in Docker

I'm building a Docker image for my Symfony app and I need to give permission to apache server to write into cache and log folders #Dockerfile FROM php:7-apache RUN apt-get update \ && apt-get install -y libicu-dev freetds-common freetds-bin…
storm
  • 403
  • 1
  • 4
  • 9
22
votes
2 answers

chmod -R makes files in child folders ureadable for some reason

I was adjusting the permissions when setting up some WordPress themes, and ran chmod 664 -R theme-dir/* It worked fine on the files in the root of the directory, but all the files in subdirectories now read like this when I ls -l: ?--------- ? ? ?…
Sal
  • 223
  • 1
  • 4
18
votes
2 answers

How to set file/folder permissions using Rsync from Windows to Linux

I want to transfer lots of files/folders from Windows to Linux using Rsync. On linux server(destination), I want the file permission set to 644, and folder permission set to 755. If possible, I want the ownership set to root.root for all the…
garconcn
  • 2,388
  • 8
  • 35
  • 46
16
votes
5 answers

vsFTPd default uploaded file permissions on Ubuntu not working

I have a Server running Ubuntu 12.10 x64, and the last version of vsFTPd. My user example.com has its home folder set on /var/www/example.com, I created a public_html folder inside and gave 777 permisions to it, and removed the writing permissions…
lucasmx
  • 640
  • 1
  • 6
  • 13
16
votes
4 answers

How do I copy ACLs on Mac OS X?

Most unix derivates can copy ACLs from one file to another with: getfacl filename1 | setfacl -f - filename2 Unfortunately Mac OS X does not have the getfacl and setfacl commands, as they have rolled ACL handling into chmod. chmod -E accepts a list…
MagerValp
  • 311
  • 1
  • 3
  • 9
16
votes
5 answers

CHMOD - Applying Different Permissions For Files vs. Directories

I've been trying to clean up permissions on a few boxes and have been scouring the chmod man as well as all the internet documentation that I an handle without any luck -- so here we go. Basically, I've got a directory with many sub directories and…
Skone
  • 489
  • 1
  • 4
  • 13
12
votes
1 answer

Nginx doesn't have permission to access files with the same ownership

i've just installed nginx on an Archlinux box and encounter this problem: Nginx is configured to run as "nginx", a new user/group that I added, in /etc/nginx/nginx.conf: user nginx nginx; For doublecheck: $ ps aux | grep nginx nginx 9678 0.0 …
Lamnk
  • 1,095
  • 3
  • 11
  • 17
12
votes
9 answers

Is there a way to run chmod on Windows

Is there a way to run the chmod command on Windows?
Techboy
  • 1,550
  • 7
  • 31
  • 49
12
votes
2 answers

rsync - failed to set permission - operation not permitted

I got the following command with this error rsync -avz --links -O /home/jansiatest/.jenkins/workspace/svn_to_demo/trunk/CPS/ jansia@ps27670.dreamhost.com:/home/tasklite/temp sending incremental file list ./ rsync: failed to set permissions on…
Jerome Ansia
  • 261
  • 1
  • 2
  • 10
11
votes
2 answers

Using chown to change the group owner of a directory is not permitted....Why?

I am trying to execute chown on a directory that has the following permissions and owners: drwxrwxr-x 2 justin devs 4096 Jan 1 20:42 test I am trying to simply execute the following as the justin user: chown justin:nginx test So basically just…
Justin
  • 5,328
  • 19
  • 64
  • 84
11
votes
3 answers

How to allow members of a group to change file permissions on linux

I need to allow members of the group 'ftpusers' to be able to change permissions on all objects inside a certain directory. I was looking into how to do it but all I have found is how to do it on BSD: chmod +a "ftpgroup allow writesecurity"…
Drasko
  • 135
  • 1
  • 2
  • 7
1
2 3
16 17