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

learn more… | top users | synonyms

0
votes
0answers
139 views

chgrp and chmod not working in cygwin (windows 8)

I work in "C:\Users\leyou.ssh" I need to chmod id_rsa to 600 as it's currently 644, but it has no effect. Hence I tried "chgrp Users id_rsa" but it doesn't work neither and the group remains as ...
1
vote
2answers
38 views

sudo chmod o+x but still can't run as regular user

I thought that doing sudo chmod a+x /root/file.to.execute or even sudo chmod 777 /root/file.to.execute should allow me—as a user—to run the program in question. But after doing this I still can’t run ...
1
vote
1answer
4k views

chmod 777 on local server not working

i have a ubuntu 10.10 box on my local network and sshing with my mac what i did is chmod 777 the www directory recursively so that i can use my fav ide to develop on it. i did this sudo chmod 777 ...
0
votes
1answer
49 views

cygwin's chmod behaves as working, but it does not work

My Cygwin installation is behaving strangely: chmod does not work. [09:45 Administrator@DellIns14 ~] > ls -ls /usr/bin/chmod 64K -rwxr-xr-x 1 Administrator None 38K Feb 6 2012 /usr/bin/chmod ...
51
votes
6answers
19k 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
9 views

tree will not descend into directories

I just unpacked a tar file with a folder in it. I did a tree -F and saw asterisks popping everywhere. All of the files (even png, txt, etc) were marked as executable. So I did what any sensible human ...
0
votes
2answers
24 views

chown not working on ext4 hard drive

I have a new 3TB internal hard drive and after writing some data to it I completely zero'd the drive using DD. I then created a partition table (GPT) in Gparted and created an ext4 partition. All went ...
1
vote
1answer
36 views

chmod throws missing operand on 764, OK on 664

Having set everything in my project to 777 (rwxrwxrwx) for debugging purposes, I wanted to dial down the openness and set the directories (not the files) in the root folder to 664 (rw-rw-r--). To do ...
1
vote
3answers
5k views

Git pulling without root access

On a Ubuntu Server 10.10 box, I seem to require root access to use git pull (in my /var/www directory). error: cannot open .git/FETCH_HEAD: Permission denied. I have tried chmodding 0777 /var/www and ...
-1
votes
1answer
46 views

Can't run chmod on a bin file

I am trying to install the android NDK on OSX 10.10. Even though the file is there it keeps returning "No such file or directory" user$ ls acs git-media npm acs-debug ...
0
votes
1answer
35 views

Make my custom program root

I have a custom program in C, that iterates trough a directory and writes a log file with the contents in my home. However, it cannot acces /var/log/ /etc/ and other root folders. How to change that? ...
0
votes
1answer
29 views

change permissions for only one user in Apache-managed directory

Ok, this may look like it might be an Apache or an Owncloud question, but I think the way I want to try and solve the problem is a more generic one: On a Mythbuntu 14.04 server box, I have Apache ...
0
votes
0answers
10 views

Mounted Share from TerraStation file server - can't change file or directory permissions

I am trying to delete files from the TerraStation share in a subdirectory. These are marked by TS as having permissions issues. Through a terminal window (Mac, OS 10.10, CentOS) I su then cd to ...
7
votes
5answers
18k views

How to reset folder permissions to their default in Ubuntu?

I recently typed the command sudo chmod 777 -R / after that some things like sudo -i are not working normally. So I am wondering if there is any way I could reset the folder permissions to their ...
1
vote
0answers
30 views

Chmod doesn't work for all files

I'm trying to chmod my /var/www folder in Ubuntu, with the command: chmod -R 775 /var/www, and it works for the existing files. However, every time I add a new file, I have to run the command again, ...
2
votes
2answers
80 views

Error writing to USB mounted on Raspberry Pi

I have a Raspberry Pi which I recently bought, and am planning to use it as a torrent box. While setting it up (over SSH) I tried to mount a 8GB SanDisk USB Drive I had connected to it earlier. ...
1
vote
1answer
54 views

What does `chmod u+s directory` do?

chmod g+s directory makes new files inherit the group of the directory. I thought that chmod u+s directory would make them inherit the directory owner, but they don't and I see no other effect.
17
votes
3answers
16k views

How to chmod and chown hidden files in Linux?

How do I recursively execute chmod or chown for hidden files? sudo chmod -R 775 * does not work on hidden files. The same thing goes for sudo chown -R user:group.
5
votes
2answers
162 views

What is this hidden directory doing on my Desktop?

On my Mac I just encountered a hidden directory on my desktop. I don't recall putting it there. When I type ls -la in Terminal on the desktop I get the following: The last folder is what triggered ...
7
votes
3answers
8k views

How to set default permissions for files moved or copied to a directory?

My question is similar to How to set the default file permissions on ALL newly created files in linux - but differs in important ways: I want all files created in (or copied to or moved to) a certain ...
8
votes
1answer
352 views

Why will chmod 0000 directory-name not clear the special bits on the directory?

$ mkdir test $ chmod 0000 test $ ls -la | grep test | awk '{print $1}' d---------. $ chmod 6000 test $ ls -la | grep test | awk '{print $1}' d--S--S---. $ chmod 0000 test $ ls -la | grep test | awk ...
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?
2
votes
1answer
945 views

chmod does not change file permissions

I am trying to create an executable "Hello World" ruby file and I copied an existing, working executable "Hello World" ruby file and renamed it, but the new file does not have any executable ...
1
vote
0answers
48 views

Is there anyway you can restrict users from executing a command with another name?

I'm not asking an obvious question here. I would like to elucidate with an example. A user 'bob' is always executing 'chmod 777 /home/bob/impfiles' so that user 'alice' could make changes to the ...
0
votes
1answer
40 views

Shell Command that Combines chmod and chgrp

Is there a combined variant for chmod and chgrp that sets both user and groups permissions in one single system call for each file? This is useful for increasing performance on slow data layers such ...
20
votes
5answers
36k views

What is the meaning of “chmod 666”?

I am using Linux. What is the meaning of chmod 666?
0
votes
2answers
62 views

Change default permissions for new files and folders

Every time I create a new file or folder in Linux, it is accessible for r/w by myself, not the group. I want to change my system setting such that every new file or folder will be automatically ...
9
votes
2answers
9k 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: ...
0
votes
1answer
134 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 ...
0
votes
1answer
230 views

Cannot change directory into home directory, although permissions are set correct

I guess I need some help from an advanced Unix user... On a Ubuntu System I did something stupid. I typed sudo chmod 774 .* or the like, in a subfolder of my home folder and then I suddenly could not ...
2
votes
3answers
1k views

What does the 3 mean in drwxrwsr-x 3

I'm following directions on configuring Dovecot MDA and the instructions are telling me that /var/mail should have the following permissions: drwxrwsr-x 2 root mail When I ran ls -ld /var/mail the ...
-3
votes
1answer
264 views

lost and important file for python 34

My AVG internet security deleted a file called: C:\Python34\pythonw.exe I now cannot access IDLE or even re-install python 3.4, although I can access the command line. How would you chown that file?
0
votes
2answers
4k views

cannot create directory. permission denied. but i have permission

i'm fairly new to linux, and ran ubuntu the other day. it is running dual boot with windwos 8. now, the problem is, even though i log in as root and give a specific folder ALL PERMISSIONS (#chmod 777 ...
0
votes
1answer
36 views

How can I skip mounted directories with chmod?

chown supports a -x option to ignore file system mount points. Is there an equivalent for chmod?
0
votes
2answers
116 views

changing the ownership of a file in linux

I have a file "test" on an Ubuntu system owned by the root. The ls -l option is shown below. $ ls -l test -r--r----- 1 root abacus 373 Nov 12 19:19 test I know that only the owner of a file can ...
0
votes
1answer
93 views

Is it possible to disable chmod/chown from sudoers for these specific directories /usr and /etc?

There has been two occasions where I have accidentally chmod-ized 777 the whole direcotry of /etc and it has forced me to come to the decision that I'd be better off to do fresh installation of OS ...
8
votes
7answers
29k views

Equivalent of chmod to change file permissions in Windows

Is there any Windows equivalent of Linux's chmod to change the permissions of a file?
0
votes
1answer
224 views

I broke SSH by using chmod on an EC2 Instance — How do I correct?

I have been running an Amazon EC2 Instance for a while, and recently accidentally changed permissions/ownership on folders recursively. I can no longer SSH into the instance. I do not recall what the ...
1
vote
2answers
2k views

How to chmod +x a file in Windows, for use in Linux?

I have a file that needs to be executable in Linux, which I'd do by using chmod +x when using Linux. My problem is: this file is compiled in Windows, and it's a pain to have to open my Ubuntu VM to ...
0
votes
0answers
48 views

I am unable to change permissions of files in my home directory(NIS)

I am unable to change permissions of files in my home directory. For example: Here /home/user1 is the home directory of the NIS user which is mounted from netapp filer. user1@localhost ~ $ pwd ...
4
votes
4answers
5k views

Fixing/Correcting OS X home folder file permissions

Long story short, I managed to muck up the file permissions within my home directory in OS X (Lion). While I'm familiar enough with linux file permissions and more than comfortable changing them, I ...
0
votes
1answer
40 views

Granting full rights on all files (owned by su) within certain directory

I got some trouble with a server situation, where i keep some configuration files in a sub-directory of a web project. Using my superuser account, i make changes to these files, which NetBeans commits ...
3
votes
3answers
6k 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 ...
0
votes
1answer
70 views

How do I do undo chmod /usr/bin

For some reason I was messing around and did chmod -x /usr/bin/* (no idea what I was thinking) Is there a way to fix this, because at the moment nothing is executable
1
vote
1answer
4k views

Recursive write permissions on files and folders: Prestashop installation

I am trying to install Prestashop in my Linux machine. But it says Recursive write permissions on files and folders: ~/config/ ~/cache/ ~/log/ ~/img/ ~/mails/ ~/modules/ ~/themes/default/lang/ ...
0
votes
0answers
66 views

vsftpd and persistent errors

I'm configuring a ftp user using this : useradd mz -d /home/ftp/mz -s /bin/false then check password: passwd mz and setting permissions chmod -R 777 /home/ftp/mz and changing owner chown ...
1
vote
2answers
386 views

chmod 700 -R ~ - is it safe?

I'm thinking of doing 'chmod 700 -R ~'. Can it be dangerous? What can happen what I don't expect? Also, is there any way to keep all files on $HOME to be -rwx------?
0
votes
0answers
1k views

Windows 8 permissions (CHMOD) with XAMPP

While I know that CHMOD is impossible in Windows, I do have a problem with permissions. I'm running XAMPP on Windows 8 Release Preview and I'm trying to install ModenaCam. However, I get an error ...
1
vote
1answer
93 views

Why does 'cd' not work on an entry with 'directory' attribute?

My OS is fedora 20. I act as a root user. under / directory, I input: #ll ... d????????? ? ? ? ? mnt ... #cd mnt bash: cd: mnt: Not a directory #chmod 777 mnt chmod: cannot access 'mnt': No such ...
1
vote
1answer
86 views

Disabling chmod for some users

In Linux system, assume that there is user 'A' (non-root user who has ssh login permission). 'A' owns an executable file "A.out". I want to allow 'A' to read/execute "A.out" However, I don't want ...