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

learn more… | top users | synonyms

1
vote
0answers
23 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
37 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
30 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.
0
votes
1answer
94 views

All websites infected with PHP Malware. What to do now? [closed]

Theres around 45 websites hosted on a Ubuntu Linux server here which has been infected with a nunmber of viruses due to bad security on the servers. I believe that a chmod of 777 in various folders ...
8
votes
1answer
335 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
43 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
36 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
55 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
136 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
189 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
31 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
73 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
183 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
94 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
0answers
31 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
40 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
36 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
0answers
59 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 ...
0
votes
1answer
51 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
79 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
155 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
82 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
66 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
78 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
130 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
486 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
400 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
0answers
47 views

backupninja osx files must be owned by root

I have just installed backupninja with Homebrew, but when I'm trying to run any ninja script I receive an error: Mar 03 14:38:24 Fatal: Configuration files must be owned by root! Dying on file ...
0
votes
1answer
109 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
28 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
316 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
274 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
27 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 ...
1
vote
4answers
124 views

Is there any harm in converting all files to executable?

I wanted to install certain software. The package had lots of files including some shell scripting files. Initially I had to select some files and then make it executable: chmod 777 shellscr1 but ...
2
votes
0answers
196 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
111 views

Permissions of files/directories in Unix

It appears that each file/directory has a given set of permissions shown by the 10 characters to the far left of each listing if one were to type into the terminal ls -l Considering that you can ...
2
votes
1answer
104 views

How to delete file with no write permissions for any user?

I find myself in a strange situation where a script wrote files with the following permissions: -r-------- 1 user1 user1 file1 Dec 24 14:53 -r-------- 1 user1 user1 file2 Dec 24 14:54 -r-------- 1 ...
0
votes
1answer
620 views

Changing permissions (read-only) for specific user for specific folder and sub-folders/files in RedHat?

Question is about user permissions in RedHat. How to give read-only permission to specific user just to read a specific folder and its sub-folders and files? How can I do it? I've tried: chmod a+r ...
5
votes
2answers
160 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 ...
1
vote
1answer
590 views

Permission denied altough chmod 777

I am running following commands: $ ls total 12K drwxrwxrwx 3 szr szr 2.0K Nov 14 12:08 . drwxrwxrwx 12 szr szr 2.0K Nov 14 11:23 .. -rwxrwxrwx 1 szr szr 1.6K Nov 14 12:08 config.xml -rwxrwxrwx 1 ...
1
vote
2answers
241 views

Restrict user access to only read from /proc

As a method for setting up some bare-bones systems monitoring, I have a script set up to SSH in, and run some basic shell commands, reading some files in /proc. I would like to create a specific user ...
-1
votes
1answer
162 views

Linux directory permission inheritance for new files created

ive following folder drwxr-xr-x 7 root root 45056 Nov 25 12:39 data which include sub dirs and files its all 755 , but when i create new file inside these dir its get permission -rw-r--r-- 1 ...
1
vote
1answer
1k views

Automatically chmod a file when doing git add?

I have an ubuntu development system using git to manage files, but I like to do my editing in QTCreator on a different (windows) system, so I have a windows network drive mapped to the ubuntu server. ...
-1
votes
1answer
45 views

simple priveleges/chmod setup doesn't work

here is the directory listing: drwxrwSr--. 31 storage storage 4096 Nov 20 23:12 storage id returns uid=501(peter) gid=501(peter) groups=501(peter),504(office),505(www),506(storage),507(media) ...
1
vote
1answer
377 views

Unable to change access permissions on external ntfs Harddrive

I am fairly new with Linux when it comes to mounting hard drives, so hopefully this is a simple question. I recently purchased a 3TB hard drive that would have read/write access with both Mac and ...
0
votes
1answer
91 views

CentOS: How to prevent a user from executing an application installed in a specific directory

I have an application installed in /etc/mydir. I have executed the following to remove the ability for users to execute this program. chown root:group1 /etc/mydir -R chmod 700 /etc/mydir -R I ...
1
vote
1answer
105 views

Why in Midnight Commander the chmod has 5 digits and what for?

In the file menu if I go to chmod, it returnes the chmod value for the folder / file. I understand the last 3 digits, the second is setuid/setgid/sticky bit (have read the docs on it but its use is ...
1
vote
2answers
1k views

What does the command “chmod a=w g+x alpha” do?

I was asked this question but didn't know what it does. I know chmod and its usages but what does this exactly do ?