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

learn more… | top users | synonyms

4
votes
1answer
39 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
23 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
1answer
23 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
14 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
60 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 ...
2
votes
0answers
21 views

Why does Linux(and perhaps Unix) set the default chmod to 644? [closed]

The 6 for the owner makes sense, and 4 for groups makes sense. But why can everyone read? It personally seems like an opening for potential misconfiguration.
0
votes
0answers
23 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 ...
6
votes
2answers
989 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
60 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
26 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 ...
1
vote
2answers
111 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 ...
0
votes
1answer
12 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
60 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
170 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
votes
1answer
105 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
36 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
52 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
18 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 ...
1
vote
0answers
35 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
212 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
154 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.
9
votes
1answer
399 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 ...
1
vote
0answers
51 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
44 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 ...
0
votes
2answers
100 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 ...
0
votes
1answer
566 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 ...
-3
votes
1answer
450 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
1answer
41 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
1answer
122 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 ...
0
votes
1answer
280 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 ...
0
votes
0answers
210 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 ...
0
votes
1answer
91 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 ...
0
votes
0answers
57 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 ...
0
votes
1answer
44 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 ...
0
votes
1answer
129 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
129 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 ...
1
vote
6answers
303 views

Give execution permission to directories but not to files

I have a directory structure with files and directories and I like to assign permissions so all the files and directories have read-write permissions for the user and read permissions for the group ...
1
vote
1answer
98 views

Linux permissions, mv is denied

I have the following structure (property is in the form user:group, user A belongs to both groups A and B, user B is just in the B group) : + dir1 rwxrwxr-x A:A + dir2 ...
1
vote
1answer
93 views

chown all files of removed user (symlinks)

I migrated my OSX System from one machine to another. Everything works fine, but when I check the files under /usr/local, they now belong to a user 502, not my newly created user (which has the ...
1
vote
1answer
120 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 ...
0
votes
1answer
26 views

Under what circumstances can I not make a file world readble on linux

I'm trying to set some files world readable sudo chmod 664 *.ogg however the files still have permission -rw-rw---- after the operation. These are phone calls recorded from Asterisk - if that ...
0
votes
1answer
153 views

Unable to retain any root created files and folders after warm reboot in linux

I installed and ran petalinux on zynq board. It runs perfectly fine and boot in around 3 seconds. To boot it this fast I had to do some configuration before compiling the source. The problem that I ...
4
votes
2answers
513 views

How to add +x just for user with chmod?

chmod +x file changes a file from rw-r--r-- to rwxr-x-r-x but really I only wanted rwx-r--r-- is this possible?
0
votes
2answers
530 views

CentOS $chmod a+w /etc/sudoers command not found

I am very new to CentOS and I am trying to edit my sudoers file. First I am told to run the following: $chmod a+w /etc/sudoers and right away I hit an error: bash: a+w: command not found What ...
0
votes
1answer
182 views

Possible to mount an NTFS partition with uid=1000,gid=1000,dmask=022,fmask=133 but allow files to later be chmod'd?

This is for a single-user system that's using an NTFS partition as its $HOME; is it possible to mount the partition in such a way that New files would be owned by $USER:$USER with 644 permission ...
1
vote
1answer
36 views

list out owned file/directories and change its permissions

Can anyone please tell how can I change files/directories owned by me only. below is the command that list out files/directories owned by me find . -user <username>
2
votes
2answers
3k views

How do I change permissions on a directory

I'm using CentOS and I would like to know how to change permissions on a folder with multiple files in it. I have used the following commands on the folder as root (Let's say folder =A) : chmod ...
0
votes
1answer
14 views

Why am I still able to write to a directory after I have changed permissions at the terminal?

I am running Mac Os 10.9 and connecting to a Mac OS server (10.8?) over our local network where I have an admin account. I regularly sync 3 directories from my machine to the fileserver using rsync. ...
0
votes
1answer
403 views

Force file and sub-directory permissions on OS X server

We have an OS X development server at work for five developers, creating mainly Symfony2 based websites. Out of the five only two of us are in the sudo group, meaning if the others had issues with ...
0
votes
1answer
34 views

OpenVPN CA Certificate creation error

When doing ./build-ca I'm getting a weird error and I cant find any information about it, been stuck with this error for hours. I'm doing it as SU and SUDO and neither work. This is the error I'm ...