3
votes
2answers
467 views

Why would chmod give “No such file or directory” when running recursively?

I can change the permissions of the file directly: # chmod --changes --recursive ug+rwX /var/www/shared/tmp/cache/assets/BA0/280/sprockets%2F286302903364106648b609d708884f78 and I can also ...
3
votes
3answers
227 views

Maintain setgid bit (after bower install or gulp build)

We run web servers where we have the following situation: The www-data user runs the web server and must have read+write access to the files The deploy user deploys all the code The bob and alice ...
0
votes
1answer
124 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 ...
0
votes
1answer
235 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
votes
1answer
67 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 ...
-1
votes
1answer
248 views

File Permission on /var/www/html [closed]

I changed the file permission. Now I am not able to access the website. nginx + php-fpm previously, chown -R user1:user1 /var/www/site.com I read in internet, and then i changed the file ...
-1
votes
1answer
283 views

FTP user not able to see or access anything?

I am trying to make an FTP account for a user, and it is not working. The user wants to be able to ftp to his sites home directory, and change stuff. I created a user(MEvans) and set the home ...
4
votes
4answers
299 views

Make recursive chmod faster

I have an installation script that unzips a directory, then recursively chmods its contents. I'm surprised it takes almost 10 times the time it takes to unzip, to run the following two commands: ...
0
votes
2answers
273 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 ...
1
vote
0answers
256 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 ...
0
votes
1answer
201 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 ...
2
votes
1answer
829 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?
0
votes
1answer
108 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
403 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 ...
3
votes
2answers
7k 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
115 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.
0
votes
1answer
78 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 ...
0
votes
0answers
85 views

Python script not executing after setting executable permission

i am having a python script #!/usr/bin/env python in top of my script? following is the permission i had set -rwxr-xr-x 1 user1 user2 6423 Nov 15 15:12 test i tried executing the script as user1 ...
3
votes
3answers
848 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
3answers
76 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, ...
3
votes
2answers
3k 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/ jansia@ps27670.dreamhost.com:/home/tasklite/temp sending incremental file ...
-2
votes
2answers
518 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 ...
1
vote
0answers
107 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 ...
-1
votes
1answer
303 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: ...
3
votes
6answers
701 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 ...
1
vote
1answer
462 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 ...
1
vote
1answer
898 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
151 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
477 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 ...
140
votes
2answers
10k 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
1k 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::--- ...
8
votes
4answers
2k 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?
2
votes
2answers
230 views

Make files editable for guests without using chmod

Sorry if this is the wrong place to post this, or if it has been posted before. I couldn't find anything though. If I log on to a linux server without supplying a username or password (from windows ...
1
vote
1answer
1k views

Why can I only upload files via vsftpd if folders are chmod 777?

I have a problem with vsftpd on Debian: I can upload files if the chmod of all folders is 777, but with chmod 755. Please help. vsftpd.conf: local_umask=022 anon_umask=0755 file_open_mode=0755
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, ...
3
votes
5answers
8k 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 . ...
3
votes
4answers
825 views

What are the cons of restricting chmod to root/sudo users?

I have an issue with some of my users misusing chmod by doing things like chmod 777 ~ -Rf I'd like to disable chmod so that only users with full sudo rights (I.E. IT) have rights. Are there any ...
2
votes
1answer
254 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
256 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
3k views

Limit sudo to only one directory and it's subdirectories by sudoers file

So I would like to limit Apache to only change permissions in a certain folder and all of it's sub-directories, so this is what I have in my sudoers file apache ALL= (ALL) NOPASSWD: /bin/chmod -R ...
0
votes
2answers
43 views

User in group with r/w access does not actually get the read/write anything

I added my user to the www-data group. I chmodded a certain directory to 774 (-R, recursively) so only the owner and the group can change something. Yet my user can't even access it. What am I ...
3
votes
1answer
2k views

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 ...
1
vote
2answers
582 views

Every file in a specific folder always 777?

I want to create a folder that is accessable via FTP on an Ubuntu Box. There are four users that are allowed to connect via FTP and I want them to be able to share files without restrictions. Is it ...
0
votes
1answer
127 views

Writing directory: permission denied even though dir seems to be chmodded correctly

I am having some trouble creating files in directory on my Ubuntu machine: I added myself to the www-data group in order for me to easily edit stuff in my /var/www dir on my development machine. ...
0
votes
2answers
364 views

Is it possible to get write/read permissions back after removing *all* read/write/execute permissions with chmod?

I accidentally removed all the permissions from a file. Now I don't have permission to chmod it. Is there any way of chmod(ing) the file back? Thank you
5
votes
3answers
4k views

chmod all files (including hidden files) in a directory in Linux (not recursively)

Yesterday I did something stupid which I today realised. I ran: /root# chmod o-rwx * .* This supposed to remove read, write and execute permissions for the world on all files in the current ...
1
vote
3answers
1k views

setgid and group write - possible for recursive directories?

I'd like to set the gid bit so the child files/folders will be set to a specific group. But I noticed that the permissions for group are only set to read and execute, not write - by default at least. ...
0
votes
3answers
169 views

chmod issue with particular user

I'm starting with chmod. I've set up a group and gave them permission (777) and every user inside the group is able to do whatever they want inside the directory /www/. However, I need to change the ...
0
votes
2answers
266 views

centos , linux , apache permission issue

I have a php file which executes a shell script $ip_access = $_GET['ip_access']; // run knock app exec("/home/knock.sh ".$ip_access); however when I access it I receive the following error in the ...
2
votes
2answers
1k views

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 -m g:group1:rwx /tmp/test ...