A Unix tool for changing file permissions

learn more… | top users | synonyms

2
votes
4answers
829 views

how to change permissions of specific file type

file * | grep 'ASCII text' | chmod -x chmod: missing operand Try `chmod --help' for more information. The above command gives me error.Basically I am trying to find all the files whose type is ...
1
vote
0answers
2k 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 ...
3
votes
3answers
1k views

Alternative to having directories with 777 permissions

I am running several websites on my dedicated server and a lot of my sites require that some directories have permissions set to 777. I know this is a major security issue, and I also know it's ...
1
vote
2answers
859 views

revert chmod 777 / -R

while executing a command i made a mistake and executed (ubuntu 10) sudo chmod 777 / -R # okay you may laugh now all my filesystem has 777 permitions , obviously i dont know which ...
5
votes
3answers
10k 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 ...
3
votes
1answer
3k 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 ...
3
votes
5answers
684 views

Chmod: defintion of everyone (777)

If I Chmod a directory a to 777. What exactly does Everyone mean? Anyone who connects with FTP without using the password or something else? I have a Wordpress CMS and I'm trying to install a plugin, ...
1
vote
2answers
1k 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 ...
2
votes
2answers
127 views

Unix Group Permissions

I have created a directory and chown to have permissions master:webmaster and chmod the folder to 775 hence group writeable. So why is it i bert as a member of webmaster cant mv the directory or ...
1
vote
2answers
2k views

Lost Permission on Files using wrong chmod syntax Centos 5.5

I was trying to remove write permissions on an entire directory, and I used the incorrect command: chmod 644 -r sites/default I meant to type chmod -R 644 sites/default The result was this: ...
0
votes
1answer
137 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
703 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
6
votes
4answers
3k views

Making Apache able to write to PHP files with PHP running as DSO?

I have PHP running as a DSO. As such, my installer script (which writes to a config file) can't do any writing. How do I give apache (user: nobody) the ability to write to the file?
6
votes
3answers
6k 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

chmod of 400,000 files inside multiple subdirectories?

Howdy... I'm looking to chmod 777 a whole bunch of files. Alternatively, since it's more secure, I could also settle for a chown www:www of these files to make them web accessible. Now, since I have ...
1
vote
1answer
481 views

Why cannot I create a file in a folder I own with chmod 655, but 755 works?

I have a backup folder owned by a system user (mongodb) and chmoded 655. When I try to create files in it, it raises a permission issue: root@maquina:/var/backups/mongodb# su -s /bin/bash mongodb -c "...
0
votes
3answers
359 views

chmod a+x to all directory and content

I am trying to install a library called libtool i am getting "./configure: line 2668: libltdl/config/mkstamp: Permission denied" when i do ./configure how can i chmod a+x all the libtool directory ...
1
vote
3answers
2k 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. ...
2
votes
2answers
542 views

CHMOD in web hosting

my Hosting is use Apache and PHP i understand what it's mean 777 in CHMOD or drwxrwxrwx or Owner, Group, Public => read, write, execute. i understand with the RW CHMOD command but what about the X, ...
0
votes
3answers
170 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 ...
2
votes
1answer
473 views

How to use set-user-ID bit on directories?

I want all files in directory /home/alex/foo to be owned by alex, no matter who creates them. I'm trying this technique, but it doesn't work (on CentOS 5, under root): $ cd /home/alex $ mkdir foo $ ...
2
votes
2answers
4k views

root directory permissions changed to 777 by mistake whats now? [duplicate]

By Mistake on Ubuntu 9.04 my colleague has changed the permissions to 777 on root directory (/) whats the best way to recover the permissions ?
0
votes
2answers
302 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
3answers
2k 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 -d -m g:group1:rwx /tmp/test ...
1
vote
3answers
258 views

What is the purpose of executable file access rights in Linux?

I never understood this, because if you have access to read a file, doesn't that mean you would be able to copy it somewhere else, thus allowing you to execute it anyway? What am I missing?
0
votes
2answers
836 views

Linux - What s means in the permissions mask of a file?

If I run ll /usr/bin/crontab it gives me this output: -rwsr-sr-x 1 root root 315432 Nov 10 2007 /usr/bin/crontab What does 's' means in the permission mask? Why do they need to use that? ...
0
votes
3answers
1k views

OSX: Undoing CHMOD

I've seen how to do this on linux, however is there a way to do it in OSX? I've accidentally ran chmod -R 777 / Looking for how to undo this. Thank you
0
votes
2answers
165 views

CMOD 755 is not possible

If CMOD 755 is not possible and 767 is not either, what is the next best permission? So far I have checked 775 and it works, but is it safe? It is an upload directory and the only people uploading to ...
3
votes
1answer
2k views

How do you give full access w/ chmod to multiple groups? Need to use ACL's?

First of all, thanks for reading. I've had success running a plist launchd job that is in my LaunchAgents folder. It basically calls a small shell script that chmod's a folder's permissions. I then ...
1
vote
1answer
371 views

Default owner of new files and directories?

How does one configure an Ubuntu 10.10 system to behave like this: User creates a new directory or file. User is the default owner of this file. The file's (or directory's) permissions default to ...
7
votes
3answers
5k views

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 ...
4
votes
1answer
980 views

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

Should I set permissions to 777 for setup and config file?

I am writing a large PHP application (with setup) for the first time and am wondering about the security precautions I should take for permissions. setup.php uses uses fopen/fwrite to generate a ...
2
votes
2answers
8k views

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 ...
0
votes
4answers
2k views

How to delete folder of owner/group 99 99

I am using wordpress with wp-super-cache plugin. This plugin automatically created a cache folder in my site for storing the cached files. But unusually it created folder with owner/group 99 99. It ...
19
votes
1answer
11k views

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

Can't read directory owned by my group

I moved the postgres data directory to a separate partition and it works great. The directory is owned by postgres user and postgres group. d-wx------ 11 postgres postgres 4.0K 2010-06-11 08:28 data/...
0
votes
1answer
322 views

Issues with chmod resetting on Ubuntu after ftp upload

Whenever I overwrite a file using FTP, the chmod of the file gets reset to 600. What can I do prevent this? I'd like to just set the chmod for the entire directory and never have it change.
4
votes
2answers
304 views

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?
3
votes
1answer
17k views

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?
3
votes
3answers
29k views

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 ...
0
votes
2answers
348 views

Locked out by changing file permissions

I just locked my root account (and all other accounts if it matters) completely out of the RHEL 5.4 by changing permissions on every file to 400. Now I have "Permission denied" on any command that I ...
0
votes
1answer
902 views

Permission settings for apache2 web content directories with several users?

I've got a Debian VPS set up with a LAMP-stack. My apache2 instance runs on the user account 'www-data'. In addition to the root account and the service accounts I have several user accounts ...
1
vote
0answers
590 views

Python server does not excecute PHP script: permission denied

I am trying to execute a PHP file through a Python server. However, I get the following error: File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/CGIHTTPServer.py", line 255,...
5
votes
3answers
7k views

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: ...
1
vote
3answers
13k views

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 ...
50
votes
6answers
84k views

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

CentOS 5.4 NFS v4 client file permissions differ from original files & NFS Share file contents

Having a strange problem with NFS share and file permissions on the 1 out of the 2 NFS clients, web1 has file permissions issues but web2 is fine. web1 and web2 are load balanced web servers. So ...
5
votes
3answers
8k views

Apache “No Permission” - 403 forbidden

I've accidentally performed a wrong chown update this morning and now my /var/www permissions are all wrong. I'm unable to access anything anymore, apache will always say I do not have permission to ...
4
votes
2answers
9k views

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