0
votes
1answer
30 views

Linux permissions in /var/www: What settings can I use for good security practice and still maintain accessibility?

I'm primarily trying to set permissions inside of /var/www . We are using a project format which has the following structure in common for each project: /var /www /runtime /shared /project.com ...
1
vote
1answer
40 views

Different permissions for different groups on one folder in OpenBSD?

Is it possible to have filesystem permission ACL's (or similar) in OpenBSD? I'm trying to make a folder where one group has read-write access while a different group has read-only access. I don't want ...
0
votes
1answer
60 views

Permission denied on owned file

I'm having issues setting permissions for a specific user. I have a directory /srv/git/ in which I'm trying to create a sub-directory test containing one file testfile (owned by www:www-data). ...
1
vote
1answer
39 views

allowing php/apache to delete files in an ftp directory and subfolders

Basically, I am having an issue with a php script being able to move or delete files, and I know it has to do with permissions since that's what the php error from unlink() is telling me, but I'm not ...
1
vote
0answers
38 views

Weird permissions getting set on directories after rsync

I've got a drive on a Mac (OSX 10.7.5) that I'm sharing on the LAN. In the system preferences, the share is set so System Administrator has Read & Write access, System Group has Read Only, and ...
-1
votes
1answer
36 views

Unable to change access permissions on external ntfs Harddrive [closed]

I am fairly new with Linux when it comes to mounting hard drives, so hopefully this is a simple question. I recently purchased a 3TB hard drive that would have read/write access with both Mac and ...
2
votes
2answers
145 views

ls permission denied even with execute permissions

I chowned recusively /srv/site to www-data:www-data and chmodded it recursively with ug+rwx. I then added myself to group www-data. $ sudo usermod -a -G www-data cyrus $ sudo chgrp -R www-data ...
3
votes
1answer
234 views

Still confused by Permissions - linux, nginx, php-fpm

I have read the canonical answer at What are the best linux permissions to use for my website? However I'm still stuck. My setup is: A developer user 'ade' who owns the directories and files that ...
0
votes
0answers
42 views

How to make the proxy_cache files written by Nginx readable from my app?

I have my nginx configure to use proxy: proxy_cache_path /var/cache/nginx/stuff levels=1:2 keys_zone=s3:10m inactive=3M max_size=10000m; It creates files with permissions -rw------- 1 ...
-4
votes
1answer
56 views

What are the proper chown settings for images? [duplicate]

I am testing a piece of software that is working except for some SVG images that are not showing. When I preview them using Firebug in Firefox, it says "Failed to load the given URL," however, when I ...
0
votes
2answers
138 views

linux: grant write access to a folder for a single user

let's say we have dir1 with mode 755 root root and I want user1 to be able to write to the directory, but I don't want to add him to the root group or change the user or group ownership of the ...
0
votes
2answers
384 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. ...
0
votes
1answer
124 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 ...
0
votes
1answer
119 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 ...
0
votes
1answer
98 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 ...
0
votes
2answers
320 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 ...
2
votes
2answers
6k 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 ...
0
votes
2answers
106 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.
3
votes
3answers
627 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 ...
0
votes
1answer
126 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. ...
0
votes
1answer
170 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 ...
3
votes
1answer
327 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 ...
4
votes
2answers
504 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 ...
-1
votes
1answer
283 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: ...
0
votes
1answer
141 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 ...
1
vote
2answers
288 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 ...
3
votes
6answers
595 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 ...
-2
votes
2answers
369 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 ...
1
vote
1answer
734 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
1
vote
1answer
144 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 ...
1
vote
3answers
431 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 ...
137
votes
2answers
9k 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 ...
0
votes
1answer
271 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? ...
0
votes
2answers
746 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 ...
8
votes
4answers
1k views

Can a file that is executable be read?

If a file has permissions -rwx-wx-wx can it be read by other and group users, or can it only executed and written? Is there some way to read an executable file by executing it?
0
votes
1answer
128 views

How to achieve user permission isolation?

/opt/software /home/user1/file /home/user2/file user1 can rwx to /home/user1/file user2 can rwx to /home/user2/file softwarecan rwx to both /home/user1/file and /home/user2/file user1 can't rwx to ...
1
vote
3answers
169 views

The secure linux server by dir permissions

I am using php on Linux / Apache server. I have Three type of directories like as |_ Writeale Directory |_ PHP Files |_ Image Files Writeable Directory would used only by PHP to writing some txt, ...
0
votes
2answers
425 views

Create Symbolic Link to files below user's home dir

I apologize in advanced if this question is better suited for Stack Overflow. We have a CentOS cPanel server and we want to share some PHP code base with another user. We don't have open_basedir ...
2
votes
3answers
504 views

Cross-group file permissions in Linux

I have 2 users: Alice and Bob and 2 groups: Management and Personnel. Alice has primary group Management, and secondary groups Personnel and Alice. Bob has primary group Personnel and secondary group ...
3
votes
5answers
7k views

is it safe to chmod 775/664 with owner www-data:www-data?

To make working with my webserver easiest I am proposing doing something like the following: sudo chown www-data:www-data /var/www -R cd /var/www sudo find . -type f -exec chmod 664 {} \; sudo find . ...
1
vote
1answer
2k views

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: ...
2
votes
1answer
236 views

Setup Directory Permissions For Multiple Users To Read/Write

I am trying to figure out how to setup the permissions on a directory (/apps) so both the root user, and another user justin can read, and write into the directory. The user justin is part of the ...
2
votes
2answers
253 views

File Permissions on Ubuntu (umask)

I want to make all folders in a directory chmod to 755 and individual files to chmod 644. Is there a way I can use umask (e.g. umask 022) to specify these permissions in the future? Thanks in ...
2
votes
2answers
1k views

What exactly does this dpkg command do?

I fixed a permissin problem for nagios like discribed here. The command was: sudo dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw sudo dpkg-statoverride --update --add ...
1
vote
1answer
250 views

Ubuntu sftp default save permissions issue

I have a server running Ubuntu 8.04 LTS with sftp running on it. My problem is that when I access the server with sftp (using the username of one of my admin accounts, not 'root') and upload a file ...
3
votes
3answers
1k views

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 ...
1
vote
1answer
123 views

Permissions for user on linux machine to host website

I have root access to my hosted machine. I have created a user account 'abcd' and the user's directory is: /home/abcd/public_html In httpd.conf i have: <VirtualHost *:80> ServerName ...
1
vote
1answer
194 views

Made a mess of privileges for /var/www

I've got an installation of Ubuntu 10.10 running in virtualBox which I'm going to use for some local development. I've installed PHP, Apache and MySQL and want to use vsftpd to access /var/www so I ...
1
vote
0answers
1k views

Lighttpd 403 Errors on HTML and PHP pages

I installed lighttpd on CentOS 5.5 64-bit. Everything seems fine and running except I cannot get past 403 errors on both HTML and PHP pages. I have used CHMOD and CHOWN, changed ownership in the ...
0
votes
2answers
1k views

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 ...