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
8 views

Rsync (-aR) Create a destination subdirectory with same permissions as top folder in source directory?

I'm using rsync to grab some modules within a web platform. I am able to pull things ok, the -aR relative flag works fine, and the structure is correctly replicated into a subfolder called ...
1
vote
3answers
350 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 ...
67
votes
7answers
29k 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 ...
24
votes
8answers
69k 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?
364
votes
6answers
250k views

How to chmod all directories except files (recursively)?

How to chmod 755 all directories but no file (recursively) ? Inversely, how to chmod only files (recursively) but no directory ?
0
votes
0answers
26 views

File permissions not preserved on external hard drive

I have a brand new 3TB Western Digital "Elements" external (USB) hard drive. When I copy (cp, rsync) stuff across from my laptop file permissions are not preserved. In fact everything (files and ...
0
votes
0answers
13 views

Directory access not permitted

I recently installed the Open Virtual Desktop (Community Edition) on CentOS 6.6. I tried to open the folder created for a particular session. When the session was logged in, the folder could be ...
0
votes
1answer
34 views

Linux chmod: How to allow access to a folder and its subfolders/files

How can I do "chmod 704" to a folder which I want it to allow others to access and download the entire folder including its sub-folders and files? Thanks, Baha
4
votes
2answers
62 views

SUID bit on directories

In Linux there are SUID, SGID, and sticky bits for directory permission. So I am absolutely clear about the sticky and SGID bit on files or folders. What happens if I apply SUID bit on a directory? ...
1
vote
3answers
4k 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 ...
12
votes
6answers
29k 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 ...
0
votes
1answer
24 views

Prevent deletion of folder but let access to everything inside of it

I know there is the +i flag for files and directories, but i have a deeper Problem. Is there a way to prevent a folder from being deleted by an User which should be able to create / access / remove ...
0
votes
1answer
15 views

Why can't Ubuntu read external volume files after I recursively { chmod +r and remove ACL }?

The commands I used are: sudo chmod -RN /volume and sudo chmod -R +r /volume The external volume is a backup of OSX home folders. The above made it only possible to read what contents is in the ...
0
votes
4answers
34 views

On my Pi, chmod +w doesn't behave as usual?

$ ls -al file1 -r--r--r-- 1 pi pi 0 Feb 10 15:18 file1 $ chmod +w file1 $ ls -al file1 -rw-r--r-- 1 pi pi 0 Feb 10 15:18 file1 #only u is updated $ chmod +x file1 $ ls -al file1 -rwxr-xr-x 1 pi pi ...
1
vote
1answer
95 views

how to mount as read-write filesystem and not read-only

So, I'm trying to install gentoo in a virtual machine. I ran into this problem and began researching what the answer might be. The file system is read only. I can't mount it as read-write. I'd rather ...
4
votes
2answers
5k 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 ...
4
votes
2answers
696 views

OSX how to chmod a mounted AFP folder from NAS

I have mounted a drive from my DLINK DNS 320 Nas onto my Mac Mini 10.9 via AFP. One of the subfolders where I usually store photos (named '2013') is currently showing restricted access permissions, ...
0
votes
1answer
615 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 ...
7
votes
3answers
17k views

Creating files and directories with a certain owner (user/group) while sudoing

I need to wget something (results in a compressed file in cwd), then I have to extract it, then do some copy/move/modification stuff and perhaps finally execute an script (from the downloaded ...
11
votes
3answers
15k views

“chmod” doesn't 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
0answers
38 views

Killed server with chmod -R u+rwX,go+rX,go-w /

So I was trying to give files in /var/www/html/ 644 (rw-r--r--) permissions and killed the server: chmod -R u+rwX,go+rX,go-w / That changed permissions on all files it could on the entire server as ...
0
votes
0answers
52 views

(ftp client) uploaded file has wrong permissions

I've a ftp server on my linux machine, I've set rights rules to my server: I keep group and owner and chmod it to 775. When I use it at home (192.168.x.x) it's ok, files keep their group and user ...
0
votes
0answers
88 views

SFTP to multiple users access to same directory and take delete permission

I am trying to give permissions to multiple users to access var/www/my.com/folder2, which is owned by www-data. So simply I have a lot of sftp users and everyone only accessing to ...
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
2answers
3k views

Can't connect Nextetender on Mac OS-X El-Captain

I just upgraded from Yosemite to El Captain but I can't connect Dell SonicWALL NetExtender version 7.5.757. I give this log message: [general error 463] ERROR: Pppd is not setuid-root and the ...
9
votes
4answers
9k views

Git chmod problem: Checkout screws exec bit

Under Ubuntu and Debian the last committed files are getting the execution bit set, when I try a checkout afterwards. It's quite strange and driving me nuts: $ ls -l file -rw-r--r-- ... file # on ...
24
votes
2answers
67k 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 ...
5
votes
3answers
7k views

whats the difference between chmod 777 and chmod 7777

I have a professor who insists on always typing chmod 7777, but I was taught that chmod 777 was the proper convention. I tried them out on the command line and chmod 777 something.txt yeilds ...
22
votes
4answers
25k 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.
0
votes
0answers
107 views

Why does chmod g+s not work on my NFS mounts?

I've got some NFS mounts that have directories that I need chmod g+s set so that any files extracted inside of them retain the default GID. For some reason it won't let me change this on the NFS ...
12
votes
3answers
17k 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: ...
19
votes
3answers
154k views

Chmod to allow read and write permissions for directory

I have created directories in root. I am looking for the chmod command to allow all users read and write permissions to a specific directory. I have done chmod 775 for a file but I need this for a ...
0
votes
1answer
361 views

How to read ls -l permissions

I've been trying to understand Linux permissions. I know that I could download one file via CyberDuck from a remote Linux machine and the other one I was not able to. Here is the output of ls -l: ...
0
votes
2answers
56 views

used chmod wrongly to mess up copy rights. How to correct

I ran a chmod command like chmod 644 dir/* It seems to have worked for files in this directory, but files in all other sub-directories are now in some limbo state. ls -l dir/sub-dir shows: ...
0
votes
2answers
99 views

Confirmation prompt for chmod, chown

I'm just trying to add a confirmation prompt to a few linux commands like chmod and chown. I've tried to google this but I can't find much information on the topic. While searching I found out ...
1
vote
1answer
22 views

chmod without modding other user perms

I want to chmod a file but I want to do it so it doesn't effect the other "user"/"groups" e.g. giving the root 0 before 741 chmod 0** [filename] after 041 or give the group a 7 before 741 chmod ...
0
votes
1answer
36 views

chmod 777 based on directory

I am wanting to perhaps create a cronjob that will monitor a directory and will do automatically chmod 777 and files that are created inside the directory or a subdirectory of my main directory. Is ...
1
vote
2answers
667 views

Changing access rights of the specific folder for specifeid user

what is the exact analog of the following two commands in linux # chmod -R +a "www-data allow read,delete,write,append,file_inherit,directory_inherit" /path/to/moodledata $ sudo chmod -R ...
4
votes
5answers
7k 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 ...
4
votes
1answer
137 views

What does chmod 7760 <directory> do in CentOS 7 bash?

I typed the command chmod 7760 by accident. I meant to type chmod 770 and now I'm curious what the first command did exactly. After typing chmod 7760 , I typed ls -Al and the directory name was ...
0
votes
1answer
71 views

Converting these chmod commands to cacls?

Perhaps someone could help me. I'd like to convert the following chmod commands to use on Windows 7 but my understanding is lacking. /bin/chmod -R u+w,go-w,a+r somedirectory /bin/chmod a+x ...
1
vote
0answers
37 views

Automatically chmod a+r on files copied into my (OSX FUSE / sshfs mounted) VFS

I have a virtual Linux machine running LAMP. On my MacBook I've mapped ~/remoteFS to this machine's ~/ using OSX FUSE & sshfs. i.e. First I install OSX FUSE. then I do: sshfs ...
0
votes
1answer
387 views

How to correctly set writable the /var/www/ directory of an Ubuntu Linux system?

I am a software developer so I am not so into operating system configuration details and I have the following problem. I have installed a LAMP environment of an Ubuntu Linux system dedicated to the ...
0
votes
0answers
66 views

World writable sudoers, no root password set

I have Kubuntu 14.04 installed on USB flash drive. Yesterday by accident I did chmod 777 /etc/sudoers. Now I can't set it back to 0440, because I get an error something along the lines of 'File is ...
8
votes
2answers
2k views

Vi can write to file despite file being read-only

The following example show how to create a file with only read permissions. As we can see, when I try to write to this file using the echo command I get, Permission denied. But why, in the case that ...
0
votes
0answers
254 views

DD-WRT: /tmp folder permissions

After making a simple hello world OpenWRT package I installed it to the /tmp folder on the dd-wrt device. The program shows up in ls /tmp but when I try to execute it, it shows me /tmp/helloworld: ...
1
vote
0answers
27 views

Making file's mode 000 on cygwin - does not work

Seems cygwin is unable to cancel a file readability mode, viz.: $ echo "123" > ttt $ cat ttt 123 $ ls -ls ttt 1 -rw-r--r-- 1 Administrator None 4 Mar 22 10:19 ttt $ chmod 000 ttt $ ls -ls ttt ...
2
votes
4answers
4k views

File still unwriteable in /var/www/html after the chmod command

I've got some trouble while trying to install some applications on my linux system. It is said that the files in my /var/www/html/xxx directory, where I put them, is not writeable. The command chmod ...
0
votes
0answers
389 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
343 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 ...