chmod (short for change mode) is a Linux / Unix command used to change permissions of files and directories.

learn more… | top users | synonyms

3
votes
2answers
496 views

Restoring lost group permissions on mac

Using mac's terrible file sharing prefs, I managed to goof up permissions on my Documents directory. My non-Documents directories have permissions like this: drwx------+ for . drwxr-xr-x+ for .. ...
2
votes
3answers
3k views

difference between chmod 777 and chmod 007

What is the difference between chmod 777 and chmod 007? if 'others' means everyone, doesn't that strongly suggest the truth that chmod 777 = chmod 007?
0
votes
3answers
159 views

Shared hosting, stop user deleting .html 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 ...
0
votes
0answers
354 views

linux chmod not working with windows flash drive

I have a dual boot ubuntu 12.04/win7 machine. I am trying to compile the latest m0d_wsgi file using ...
4
votes
1answer
4k views

icacls is giving access denied on remote file system

I am working on remote drive mounted on my system where i created some file i need to set some permission for that file. I used icacls but its not working. When i am trying to access file permission ...
0
votes
1answer
1k views

How to open a file with write access on OSX terminal?

I am trying to open private/etc/php.ini.default file to add detect_unicode = Off. But after opening above file with this command vim php.ini.default, it only opens this file as readonly. How can I ...
2
votes
0answers
173 views

Debian broken filesystem by chmod -R 0774 /

An user made the chmod -R 0774 / command. When i execute the su command i get: "it was not possible to define groups". If i try to ssh from the root i get: /bin/bash permission denied the ...
0
votes
1answer
417 views

Change owner of file without being root

I suggest that I have a log file with 666 permission and its owner is alice. So user 'bob' can change its owner by this: cp log log.temp; rm log; mv log.temp log So how can I fix this risk?
0
votes
1answer
119 views

Cant write to directory when not logged in as root

I am switching a site over to amazon ec2 and the pages that allow a user to upload a file to a directory arent working. When Im logged in as root via ssh I can 'touch' a new file to there but not when ...
4
votes
4answers
354 views

Accidentally did “chmod 600 -R /” on my macbook pro

I accidentally entered sudo chmod 600 -R / when I meant to enter /Documents/some_file and now everything comes up as permission denied. The root password isn't working. All my applications are shut ...
3
votes
1answer
569 views

chmod always unsets setgid bit on directories if I'm not in a group

Here's the scenario: I'm using Ubuntu Linux (12.10, if it matters), and I've got a directory whose permissions are thus: drwxrws--- paul www-data myfolder/ You can see the setgid bit is set. If ...
0
votes
2answers
434 views

What do these chmod parameters mean?

What changes are being applied by u+s,o-rwx in the below? chmod u+s,o-rwx myUserGroup myFile
1
vote
1answer
87 views

how to join paths to {} inside an -exec option of a find command?

//// SOLVED //// I'm trying to copy several files scattered in a directory structure to another one where such files already exist but without write permission allowed. So I used a find command with ...
1
vote
2answers
393 views

Debian: Removing read permissions to a single user

i'm trying to set permissions with chmod in Debian Squeeze. Its there any way to remove read permission to a single specified user? chmod u-r file That seems to deny permissions from the user ...
1
vote
2answers
100 views

Changing permissions for specific folder

i need some help. I'm using Fedora 15. I have 2 users: user1 and user2 and directory in /usr/local/example_directory. Now for this directory owner is user1 and other users can only read this. I need ...
1
vote
1answer
64 views

Copy permissions from owner

How can I copy the all file permissions of a folder from owner to users? Imagine that I have: -rw-r----- 1 124982 5000 201 2012-06-24 06:45 documentation.html I want to change to: -rw-r--r-- ...
2
votes
3answers
332 views

Does permission 777 allow scripts outside your server to write on it?

Let's say example1.com is located in US, and example2.com is located in EU. example1.com/folder/ has 777 permission. Will a script in example2.com be able to write on example1.com/folder/? Or is ...
1
vote
2answers
3k views

sftp chmod recursive

I have logged into a server via sftp via terminal. When I run the command chmod -R 755 ./* I get the error You must supply a numeric argument to the chmod command.. How do I apply a recursive ...
0
votes
2answers
1k views

Chmod 644 on /etc/ any way to fix?

I tried to tab complete something and I guess it wasnt there. I know you are not supposed to set the permissions to /etc/ like that, but my permissions seem to be all messed up. whoami prints out ...
1
vote
1answer
236 views

How to give user read/write access to folders?

I'm running a certain script that is using a non-root user to do the following... mkdir: cannot create directory `/srv/www/example.com/releases' *** [err :: 12.23.45.789] : Permission denied How ...
0
votes
1answer
384 views

Why is group write permission ignored in Ubuntu?

I want my user to have full access to the local Apache root folder, and I also want the Apache user to have full access to the same folder. What I did was create a new group called DevGroup and I ...
0
votes
1answer
146 views

Does “chmod -R 700 directory_1” update directories pointed by softlinks?

Does "chmod -R 700 directory_1" update directories under softlinks? Forexample, there is a softlink under directory_1 folder: "my_softlink". And my_softlink points to a directory_2. Will permissions ...
5
votes
1answer
1k views

chmod'ing file on exFAT

Is it possible to chmod a file on an exFAT formatted drive? I'm on Mac OS X and I would like to set the permissions to not be 777. Is this possible? What I'm really trying to do is set the ...
1
vote
1answer
724 views

On Linux allow a file to be read/write but not deleted

Is there a way in Linux on a ext4 file system that I can make a file readable and writeable but not deletable? The directory that the file resides in still needs to be writeable by the owner of the ...
14
votes
2answers
40k views

How to chown/chmod all files in current directory?

I am trying to change the ownership and permissions of some files (and directories) in the current directory. I tried this: chown username:groupname . ...expecting that it would affect all the ...
3
votes
2answers
527 views

I don't fully understand CHMOD file permissions, can anyone better explain it?

I've searched the internet for some time for a good explanation of CHMOD, but have yet to come by a good explanation, since every explanation uses the same words with small variations. What I know so ...
1
vote
1answer
774 views

folder permissions on FreeBSD

I have a drive on my FreeNas (8.2) box which transmission copies files automatically when it is finished downloading them. It works fine as long as the download is a single file, if it's folder with ...
2
votes
1answer
1k views

Making a program always run as root in OS X

I'm trying to make a C program run always as root, no matter who is calling it. Basically, I want it to invoke "mkdir /test" as an example. So I created the C program as follows: #include ...
3
votes
1answer
1k views

Do I have to chmod after ln -s?

After I create a symlink with 'ln -s' (in Ubuntu 12.04, as root), it seems to be created with 777 permissions. Is that normal? Should I always do 'chmod 644' after doing 'ln -s'?
10
votes
2answers
12k views

How can I do a recursive chmod only on directories?

I want to change permissions on a tree on Centos 4 to add execute permissions for all directories recursively from a directory. If I use normal chmod, files other than directories are also modified: ...
5
votes
3answers
8k views

“chmod” doesn't want to work

I wrote a /bash script and to execute it I decided to set all the rights, so I tried chmod 777 * //I had 3 text files in the directory, so that's ok Then to check the result I typed ls -l But ...
2
votes
3answers
1k views

chmod: Set files to different permissions from directories

Is there away that I can run chmod to set the folders at 0755 and the files at 0644, or do I have to apply 0755 to all folders individually?
3
votes
3answers
149 views

linux permission conflicts

I'd like to ask you something that's bothering me for the last couple of days. On my system I keep a folder called myscripts under my usual home folder. What I tried to do is chmod 500 myscripts ...
1
vote
2answers
247 views

find files where group permissions equal user permissions

Is it possible to do something like find -perm g=u? I say "like" because -perm mode requires mode to specify all the bits, not just g, and because I can't put u on the right side of the =, like I can ...
1
vote
1answer
473 views

Accidentally removed read permissions from folder. How do I get back in?

I wished to have a given folder and file and all descendants, write permissions. I wished that ALL files and folders could be recursively granted he following permissions: 777 So I tried: chmod -r ...
0
votes
1answer
565 views

Changed the mode of /var on debian

I ran chmod 777 recursively on /var/ and could no longer connect via SSH. I read that chmod 600 would fix it. I was able to connect after doing it but this was a bad idea. Is there anyway I can find ...
-5
votes
1answer
282 views

Chmod to change permissions for group [duplicate]

Possible Duplicate: Setting permissions for specific user and groups in Linux I have put some users into a group and would like to know how I use chmod to change the access permissions for ...
1
vote
2answers
3k views

Why doesn't chmod work in this case?

I'm trying to set a small webserver for personal use. I have a fodler /srv/http/cgi-bin/ which I want to edit as user and not superuser. I tried to chmod it as mentioned here. Here is the result: ...
0
votes
1answer
255 views

what do these permissions mean?

I did chmod on some files in Mac 10.7.3 and I accidentally entered the code 7744 instead of 744. The resulting permissions were: -rwsr-Sr-T After seeing this I reran chmod and fixed the ...
2
votes
1answer
326 views

Unable to create files in a directory

I have created a directory in Virutalbox. Using VBoxManage, I am executing a script inside the Ubuntu VM directory I created above from Ubuntu host OS. But if the script in the VM contains commands ...
2
votes
2answers
3k views

Restore default permissions to “/var” to CentOS installation

So I accidentally ran chmod -R 0777 /var and I need to revert that (let alone allow chmod the correct ssh directory so I can log back into it). I'm feeling screwed, can anyone help? The sooner the ...
0
votes
1answer
295 views

Give the www user chmod permissions

Ive got a website (run on Ubuntu Server) that needs to modify and delete files, every now and again it comes across a file that it needs to run "chmod" on in order to perform it's operations. However ...
1
vote
1answer
1k views

Why am I unable to change read permissions with chmod?

If I type this in the terminal chmod -R g+r "/media/truecrypt1/My folder/"* and then check the result wiht ls -l I still get -rwx------ 1 user user 127860 2012-03-16 15:45 sample.pdf What's ...
1
vote
1answer
225 views

Search for chmod 777 in terminal

I'm working with a system where a few files and maps seem to have permission 777. I want to change them to a more secure chmod, but I don't have a list of all the 777-files. I could do a terminal ...
3
votes
2answers
6k views

How to fix /etc/ folder on Mac OS X

I was following a tutorial which had this command to create a launchd.conf file in /etc/ sudo echo "some command" > /etc/launchd.conf But it wouldn't work, I got permission denied after entering ...
2
votes
1answer
260 views

Weird chmod parameter - “!$”

I found on an article a line that was saying: Now execute -> sudo chmod 700 !$ What does !$ in that case?
0
votes
1answer
977 views

allowing others access to specified subdirectories only

I have some folders with pictures and videos that I would like my other family members be able to view. I have added these folders to the family group, like this: chgrp -R family shared_pictures/ ...
0
votes
1answer
846 views

No permission for ls drwx--x--x

Is there any way to see a tree of directories with a chmod of drwx--x--x ? I know I can manually check by bash script with if [ -d dirname ]. However it is not the solution I am looking for. Cheers!
59
votes
7answers
23k views

Using Cygwin in Windows 8, chmod 600 does not work as expected?

I'm trying to change the the permissions to my key file key.pem in Cygwin 1.7.11. It has the permissions flags: -rw-rw---- chmod -c 600 key.pem Reports: mode of 'key.pem' changed from 0660 ...
0
votes
1answer
170 views

linux chmod causing crash

I needed to give write permission to file representing GPIO pins,out of curiosity i taught changing permissions of all files/folders,by mistake instead of doing chmod 755 * in the root I did chmod ...