Questions tagged [chmod]

A Unix tool for changing file permissions

Filter by
Sorted by
Tagged with
1 vote
2 answers
11k views

Best way to recover mysql from a "chmod -R 777 /" with databases intact

Question: What is the best way to recover mysql (or worst case: migrate away) from a "chmod -R 777 /" with databases intact? System: Ubuntu 12.04 LTS MySQL 5.5.24 64 bit Amazon EC2 cloud server. ...
robertb556's user avatar
1 vote
1 answer
342 views

Git prime/hub website deployment: documentroot changes save fine but permission denied for subdirectories

Following the instructions in A web-focused Git workflow I set up a prime and hub repository on my web server and then cloned the hub to my machine at home. I started testing commits and pushes with ...
Ian's user avatar
  • 251
4 votes
1 answer
1k views

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 &...
dusz's user avatar
  • 155
1 vote
0 answers
1k views

CHMOD permission denied on SMB share

I'm mounting an SMB/CIFS share on my CentOS 6.4 server using /etc/fstab as follows: Mount windows share to /mnt/mywebsite //10.1.1.4/mywebsite /mnt/mywebsite cifs username=httpd,password=...
Brad's user avatar
  • 619
0 votes
1 answer
546 views

CHMOD 0777, but Wordpress still not able to write files/folders

The day before yesterday I ordered my own VPS. But now I have problems with Wordpress, Wordpress is not able to create a .htaccess by itself, not able to write to it and plugins aren't able to create ...
Erik van de Ven's user avatar
0 votes
1 answer
1k views

How to add write permissions to php/apache? [duplicate]

I've got the following scenario: There's a folder named "uploads". It's owned by "root" and it's group is "webmasters". Permissions are set to 755. drwxrwsr-x 2 root webmasters 4096 Mar 20 22:49 ...
netblognet's user avatar
1 vote
1 answer
2k views

Chmod operation not permitted?

I'm trying to deploy a rails app and i've done it before, but this time i'm having a weird issue. Why can i not run this chmod command? I'm currently logged in as user: csmsched -bash-3.2$ pwd /var/...
Catfish's user avatar
  • 247
1 vote
2 answers
1k views

List all folders that have permissions of 777

Is there any way to list all the folders that have permissions of 777?
Anselme's user avatar
  • 123
6 votes
1 answer
21k views

chmod 1777 or 3777 on /tmp

Is there an ideal chmod for /tmp (with /var/tmp symlinked to /tmp)? I've seen people mention it both ways just curious as to the difference. Is it a security difference?
Tiffany Walker's user avatar
-2 votes
1 answer
4k views

Chmod all files and directories recursively to 666 under /usr [duplicate]

I want to make an chmod command that's recursively will apply the privilegies to all directoris under that. Example: chmod 666 /usr I want that every directory under "/usr" turn into permissions to ...
guisantogui's user avatar
0 votes
1 answer
83 views

Shared hosting, stop user deleting .htm file?

Hi guys I have set up a small shared hosting set up for friends. I have set the file chmod permissions to chmod 711 /home chmod 711 /home/testuser chmod 755 /home/testuser/public_html chmod o+r /...
Kal's user avatar
  • 141
1 vote
1 answer
679 views

Why is kjournald extremely active on a mostly quiescent filesystem?

Note: This is a "documenting my process" question that I'll be writing an answer to. Happily, serverfault already helped me solve this, because writing up my situation so others would be able to ...
chaos's user avatar
  • 7,493
0 votes
1 answer
339 views

/dev/* permission

I accidentally sudo chmod 666 /dev/*. And now many devices in my computer messed up. I have fixed some of them like /dev/shm, /dev/snd but I am not sure about the rest. What's the correct permission ...
iKid's user avatar
  • 165
1 vote
1 answer
697 views

sftp limitation: disable chmod +x

Do I have an option to forbid a user group or a sftpuser to set chmod +x? The user shall be allowed to upload media files, but no php scripts to run for example.
ledy's user avatar
  • 565
0 votes
1 answer
295 views

File readable by only PHP?

I'd like to make a file on my server be readable by PHP, but not directly accessible with a browser. Say my Apache installation's root is /apache. I'd like PHP to be able to get the text of /apache/1....
tkbx's user avatar
  • 201
0 votes
2 answers
1k views

CentOs, Folder Permissions

I would like to give an FTP user permission to write in a folder but should not be able to alter other files in the folder or sub folder in the main folder. I have a root account, we are using the ...
Zeeshan's user avatar
11 votes
2 answers
81k views

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 ...
Justin's user avatar
  • 5,438
0 votes
2 answers
311 views

Change ownership and permissions of file

Is it possible to change owner/group of a file AND permissions with 1 command? I tried: chmod user1:groupOfUser1=770 file.txt but it does not work.
Jim's user avatar
  • 335
0 votes
1 answer
103 views

Samba users are writing files with the same owner

I created a Samba share and 3 users (Marc, Mary and Paul), both in Ubuntu (12.04 LTS) and Samba. Then I configured 3 Win7 computers to access the share, each with different credentials. I created 3 ...
Alex's user avatar
  • 11
0 votes
1 answer
204 views

Ubuntu, How to prevent listing sub-directory if parent-directory is protected

I remember last time when I am on some Linux OS ( cannot remember ), when I change the mod of a directory to 711, that folder together with all of its sub-directories cannot be listed (ls -al) by any ...
iKid's user avatar
  • 165
0 votes
1 answer
1k views

Default owner and group for new files/folders [duplicate]

Possible Duplicate: How to set up default group permission in linux folder I'm uploading to /var/www via SFTP and wondered how I can get it so when I upload a file or folder it always has the ...
Aaran McGuire's user avatar
4 votes
4 answers
11k views

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 ...
camerongray's user avatar
0 votes
3 answers
105 views

Permissions on directories for file uploads? [duplicate]

Possible Duplicate: What are the best linux permissions to use for my website? What is the correct way to set up directories to allow user uploads on Linux? My websites upload dir is 755, but ...
John Bowlinger's user avatar
0 votes
1 answer
220 views

Trying to include file from another account: permissions denied

I have a dedicated server running php with dso handler, I am including a global config.php from one account into all the other accounts. This works fine on apache when opening the sites via browser. ...
urysz's user avatar
  • 1
12 votes
2 answers
41k views

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/ [email protected]:/home/tasklite/temp sending incremental file ...
Jerome Ansia's user avatar
0 votes
1 answer
3k views

apache user directory access permission denied

I've run chmod 777 on /home/cache/, however the apache user is still unable to write to it. My php script is writing to this directory but got a permission denied error and don't know why. ls -ld ...
user12145's user avatar
  • 1,125
3 votes
2 answers
2k views

chmod not working on vbox shared folder

The folder /var/www was mounted during init, using: mount -t vboxsf cuckoo_shared /var/www/ -o uid=1000,gid=1000,rw,dmode=755 Now, all the files belong to my user jdrummond as default. And also have ...
dmmd's user avatar
  • 415
1 vote
1 answer
27k views

File/Directory permissions for SFTP user

After using the SSH quite a lot on my 1.5 week old Debian 6 VPS, I wanted to start uploading files through SFTP. I already tried that earlier, but with the root account, which isn't possible with SSH ...
Big-Blue's user avatar
  • 179
-2 votes
2 answers
2k views

Chmod wont stick [closed]

I'm using CentOS on a virtual dedicated server. When I go in as root, and change the chmod value of a folder it works. But, any files I place into that folder do not inherit the chmod I set. This is ...
please delete me's user avatar
1 vote
0 answers
331 views

Running trac on a debian server - error writing to trac.ini

I have trac running on my debian server and I set it up using mod_wsgi through apache. Now I have everything setup nicely, except I can never seem to write to a projects trac.ini file through the site....
ingh.am's user avatar
  • 283
3 votes
1 answer
1k views

centos 6.2 gives read permission denied when root has set read permissions to all users

Installing Dropbox on Centos 6.2 owned by root. Demonstrating that the dropbox folder is owned by root with read permissions to all "root" user gives read permissions to all users [root@localhost ...
Andy's user avatar
  • 33
4 votes
2 answers
3k views

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 ...
vaab's user avatar
  • 542
-1 votes
1 answer
626 views

linux automatic change permissions in resolv.file

In various linux servers I see how the permissions of the /etc/resolv.conf file change automatically. In state normal: -r--r--r-- 1 root root 103 Jul 4 11:50 resolv.conf In changed state: -r--r--...
rfmoz's user avatar
  • 792
0 votes
1 answer
307 views

chmod -R 777 /. - RHEL 5.5

A shell script testing went bad and it issued chmod -R 777 /. to the system, instead of chmod -R 777 ./ and as expected it wiped the critical meta data. We have turned off the system and it will ...
user1263746's user avatar
0 votes
1 answer
410 views

When is chmod 777 justified? [closed]

I know that one should avoid setting file/folder permissions to 777 and instead use a more granular approach. I would like to know, if there are specific cases when using chmod 777 on a webserver is ...
user avatar
2 votes
2 answers
1k views

dkimproxy unable to read private key

I just found this error in my server logs May 17 14:55:07 marcus dkimproxy.out[1005]: signing error: Error: cannot read /etc/ssl/private/dkim_server/dkim_server.key: Permission denied dkimproxy runs ...
usr-local-ΕΨΗΕΛΩΝ's user avatar
6 votes
6 answers
3k views

Correct recursive chmod, separate for files & dirs

I'd like to recursively chmod a directory so that: Files are 0664 Directories are 0775 How to do it better, shorter, fancier? :) Maybe, use umask somehow? All find solutions are too long: I always ...
kolypto's user avatar
  • 11.2k
0 votes
2 answers
3k views

Apache 404 Error While PHP File Exists

I am getting 404 error while the file exist. I gave the file (chmod 755) still the file does not show up. Strange part it only happens to few files. I am certain the file exists on the directory ...
charles's user avatar
-2 votes
2 answers
869 views

Centos file permission issue

The script I'm using requires your files to be chmoded to 666 for editing, although even after I've chmoded the files it's telling me it couldn't write the files. I think it might be a security ...
Belgin Fish's user avatar
2 votes
1 answer
604 views

Adding Apache to a Developer Group (Web Permissions)

On a private server with an application that needs write access (Wordpress), is it better to add Apache's web user (www-data) to the "developers" group that owns /var/www or use fastcgi / suphp ...
Trent Scott's user avatar
2 votes
1 answer
3k views

Set Default User / Group (Sticky Bit) in Ubuntu

To enforce the following permissions on files in /var/www, can I use the commands chmod u+s and chmod g+s? Permissions: chown -R root:web /var/www chmod -R g+rw /var/www
Trent Scott's user avatar
1 vote
1 answer
309 views

Permissions nightmare - tried all I know

Working on a new client's dev site, which is a wordpress install on a Plesk box. I have SSH root access, and FTP access through a separate account. What I've done so far Initially I couldn't make ...
Ben's user avatar
  • 53
1 vote
3 answers
1k views

Cannot login after chmod o -rwx

I have typed a recursive chmod o-rwx command from root in a linux via ssh. After that I can not login as root anymore. It is a huge problem now. Can I do anything to do to resolve this? I can only ...
ald mike's user avatar
270 votes
2 answers
86k views

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)...
samwise's user avatar
  • 2,403
0 votes
1 answer
793 views

ubuntu change default files and folders permission

i have ubuntu 10.04 on my server. when i was create a file by ftp, php and ... files permission is 600 and folders is 700. how can i change default files permission into 644 and folders to 755? ...
user avatar
8 votes
3 answers
34k views

Change all file permissions to 644 and all folder permissions to 755 recursively

How to change all file permissions to 644 and all folder permissions to 755 recursively using chmod in the following two situation: If they had 777 permissions Regardless of the permission (with ANY ...
smhnaji's user avatar
  • 619
2 votes
2 answers
7k views

Setting up user permissions for new user

I want to add a new user to my CentOS 6 server (let's call him Barry). I've made the user account Barry and added him to a group I created called webusers like this: groupadd webusers useradd -G ...
Whitey's user avatar
  • 61
4 votes
2 answers
5k views

Linux ACL behaviour: settings the mask changes 'ls' output, but not actual permissions

It might be the time of night, but this is puzzling me. Picture the following. [root@node1 acltest]# getfacl foo/ # file: foo # owner: root # group: testuser user::rwx group::r-x other::--- [root@...
wzzrd's user avatar
  • 10.5k
2 votes
1 answer
504 views

Cannot find command after reboot even though chmod +x was successful?

Dealing with a weird problem on CentOS trying to add the Play! framework to my path. Just earlier I successfully did a chmod +x play on Play! and I could run commands. Then I rebooted and it ...
crockpotveggies's user avatar
1 vote
1 answer
2k views

Cannot access directory via SFTP - "locked"-Flag

I'am trying to access a remote Directory via SFTP. ls in the parent dir says that where the d for directory should be, there is an l. Manpage of chmod says something about "mandatory locking", but ...
gorootde's user avatar
  • 226