Questions tagged [chmod]
A Unix tool for changing file permissions
247
questions
0
votes
2
answers
2k
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
4
answers
4k
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
3
answers
9k
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
3
answers
2k
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
1
answer
759
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
3
answers
3k
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 ...
3
votes
3
answers
6k
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
2
answers
1k
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
3
answers
204
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
1
answer
650
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
$ ...
3
votes
2
answers
13k
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
2
answers
415
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 ...
4
votes
3
answers
7k
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
3
answers
584
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
2
answers
1k
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
3
answers
3k
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
2
answers
208
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
1
answer
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
1
answer
1k
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 ...
16
votes
4
answers
14k
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 rolled ...
4
votes
1
answer
3k
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
2
answers
532
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 ...
4
votes
2
answers
20k
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
4
answers
4k
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 ...
55
votes
1
answer
45k
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
1
answer
482
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
1
answer
386
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
2
answers
325
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?
4
votes
1
answer
34k
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?
4
votes
3
answers
30k
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 a ...
0
votes
2
answers
660
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
1
answer
941
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 ...
11
votes
3
answers
17k
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:
...
4
votes
3
answers
28k
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 ...
76
votes
7
answers
148k
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 ...
2
votes
1
answer
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
3
answers
11k
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
2
answers
11k
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 ...
0
votes
1
answer
46
views
Mixed ftp ssh permission problem
I'm running a webserver and I've setup two groups. One with just me, and another with me and a collaborator. I've chmodded to 755 my htdocs folder and I gave a specifically "upload" dir the group ...
17
votes
5
answers
14k
views
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'...
4
votes
1
answer
2k
views
Permission Hierarchy possible in OpenSolaris + ZFS + ACLs?
I've been doing some research into OpenSolaris and ZFS for use in a NAS.
Thus far I have created the following:
/tank/projects
/tank/storage
/tank/developer
/tank/sandbox
The ...
1
vote
6
answers
7k
views
How to change permissions on folders, but not files?
Is there a concise linux command (that will work on OSX) to change permissions on folders and all of their contents, but leave files in the current directory untouched? For example:
/parent/...
2
votes
4
answers
385
views
Why do many linux files have others=read access?
Can I run chmod o=- -R / ?
I don't want a newly created user to be able to cat /etc/passwd, just because of its default permissions. And I want to understand why these defaults were chosen for ...
0
votes
1
answer
2k
views
Windows File Permissions - Comparing to chmod
I am using an SAP specific tool (like Winzip) called SAPCAR to compress and decompress files into archives.
I have a file from SAP called KA71007.SAR
When I view the contents of this archive it ...
12
votes
9
answers
158k
views
Is there a way to run chmod on Windows
Is there a way to run the chmod command on Windows?
4
votes
4
answers
2k
views
How to restore remote access to a RHEL system from expanded permissions set over the entire filesystem? [duplicate]
Cause of the problem
I intended to add group write permission on hidden files like '.hgignore' with the following:
# pwd
/opt
# sudo chmod -R g+w .*
The problem is that '..' matched this pattern, ...
3
votes
9
answers
28k
views
What CHMOD settings to keep users from viewing directory?
I have an "includes" directory that my web server should be able to fully interact with, but I don't want users to be able to see its contents.