chmod is used to change the commonly used read, write, and execute permissions on files. It can change these permission bits for the file owner, the file's group owner, and everyone else. It can also change the more esoteric ‘permissions’ (attributes, reall) like set-user-ID, set-group-ID, and ...

learn more… | top users | synonyms

1
vote
1answer
30 views

Apply recursive chmod to files or folders only

I'd like to apply chmods to files and folders in one line, Basically: chmod 700 ./* -R # but only apply to folders chmod 600 ./* -R # but only apply to files Of course I searched google and read ...
0
votes
1answer
58 views

What does “execute” permission on a folder means? [duplicate]

I have read this topic, which gave me some info but I feel I am not fully getting it. What does the execute permission actually means on a folder? I fully understand what it means on a file, but on a ...
1
vote
2answers
70 views

relation between chmod and sudo on an executable file

What is the relationship between chmod and sudo on an executable file for a user? Are the cases that "a user needs sudo to run an executable" the same as the cases that "chmod hasn't set the ...
2
votes
4answers
105 views

File permission with setuid and octal 4000

When we set setuid to a file, we do the following in the terminal: chmod u+s filename This works fine. But the octal number 4000 is always associated with setuid (in books etc). I understand (to ...
1
vote
0answers
107 views

Can't delete 777 file with permissions on parent directory

As my VCS I use git version 1.7.10.4 . However, when trying to perform a pull, I got the following message: error: unable to unlink old 'somedir/config.php' (Permission denied) So what I did is: ...
2
votes
1answer
53 views

Why can't I chmod these files that I could earlier?

I was trying to add execute permissions to sh files in a folder. For that I mistakenly used: find . -print0 -iname '*.sh' | xargs -0 chmod -v 744 and the output was : mode of `.' changed from 0755 ...
18
votes
1answer
278 views

Why does chmod require disk space? Not-in-place algorithm?

I try to chmod some files and I get the error "disk quota exceeded": It's true that I don't have that much space remaining in the filesystem where I use chmod, ...
3
votes
4answers
81 views

How can I change all of the contents inside of directory to what the default file ownership and permissions are?

I have moved contents of another drive into my home directory, but the permissions are not what they should be. First, I changed ownership by entering: ~$ sudo chown -R USERME /home/USERHOME/ ...
1
vote
1answer
58 views

Changing permission from read only in linux?

I am trying to get the automatic brightness bug fixed in Linux Mint 17 based on the new Ubuntu release. In order to do this i had to create a file named 20-intel.conf in location ...
4
votes
1answer
123 views

chmod doesn't work on folder 'd — — ---' permissions

In /var/www I've got a folder: d--------- 2 www-data www-data 4096 May 20 2012 update reported by ls -la. I'm logged in as root, but I can't change permissions or ownership. chown and chmod ...
1
vote
2answers
130 views

Why can user have lower permissions than group or other? Who can change them?

It is my understanding that the owner of a file user can have lower permissions than group or other. What is the justification for this? Can only root and the owner change the permissions on a ...
1
vote
1answer
52 views

Why doesn't setuid not work? [duplicate]

I want my program can only be run by user xyz using root privilege. So I set setuid with: chmod u+s program1.sh ls -l program1.sh rwsr-x--- 1 root house 1299 May 15 23:54 program1.sh And I let user ...
0
votes
3answers
108 views

Applying different permissions to files vs. directories

Sunny answered the question above in this post, The answer was given as No need for scripts. // Directories: find . -type d -exec chmod XXX {} \; // Files: find . -type f -exec chmod ...
1
vote
0answers
219 views

Save motion output videos in USB Drive

I'm using a USB drive in my Raspberry to store my website. Now I want also save my videos made with motion. I wasn't able to save in a folder different from /tmp/motion so googling I found I had to ...
-2
votes
2answers
75 views

Misuse of go-r *

I am working on a test server. Was logged in as root and issued cd / chmod go-r * I certainly revoked the write permissions for the users that I had created. Did I revoke the permissions (r/w/x) ...
4
votes
1answer
265 views

chmod does not change permissions of certain directories

System file: ext4 I changed the owner of files to apache: with the command: chown -R apache: wp.localhost Then, I could not change the permissions of directories in wp.localhost nor the ...
0
votes
2answers
125 views

Unable to access a folder through group permissions

In order to secure data on my webserver, I have moved the PHP includes to a folder called /var/www-includes (outside of /var/www, the server root). I also ran chown root:wwwadmin and chmod 770 on that ...
2
votes
3answers
5k views

Create file in folder: permission denied

I'm a newbie in the GNU/Linux-Ubuntu world. I have a problem copying files to a directory on Ubuntu 12.04. I create a directory in the home directory so that the path where I want to copy to is: ...
3
votes
0answers
85 views

setting default umask and user:group on directory

I have a directory data and I need to set default umask and ownership for all directories/files (both existing and future files). I want all files in data to have ownership root:martin ans ...
3
votes
1answer
461 views

chmod + silent mode + how force exit code 0 in spite of error

Is it possible execute chmod and ignore error from command Example ( remark file.txt not exsist to show the example ) When I type chmod 777 file.txt I get error on the output chmod: cannot ...
3
votes
1answer
223 views

How to let a user execute a script owned by root? Setuid doesn't seem to work anymore [duplicate]

I have some bash scripts that I use with the user 'root' to manage iptable rules. The problem is that I want these things at the same time: The script must be owned by root Permissions must be 700 ...
1
vote
3answers
108 views

Reverse a chmod command on a directory

Is there a way to undo a chmod command on a directory in CentOS ?
3
votes
2answers
105 views

Accidentaly changed the permissions in / [duplicate]

Accidentally did : chmod -R 777 / Now, RHEL 6 is not booting up. What do I do? I have a DVD and can go into rescue mode. Can someone explain how do I reset all the permissions ? Update ...
2
votes
1answer
66 views

chmod 600 fails silently

Here is what happens: $ chmod 600 foobar.txt $ ls -l total 1 -rwx------ 0 sampablokuper sampablokuper 13 Feb 19 21:00 foobar.txt Why is the last line not reading as follows? -rw------- 0 ...
1
vote
1answer
151 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>
0
votes
0answers
15 views

Restore system with no execute permissions for bash and chmod [duplicate]

Good day everyone! One of my friends asked me a question: how to restore an unbootable Linux system (let it be CentOS or whatever) in the following situation: no execute permissions for bash no ...
0
votes
1answer
52 views

Explain the “@” symbol in this permissions example [duplicate]

I have a file on my Darwin system and the permissions are: -rwxr-xr-x@ User: read, write, execute Group: read, execute Other: read, execute What is the 11th notation the @ mean? In addition to ...
1
vote
1answer
59 views

Putting two accounts in group not giving read access to group members

I have an Apache based web site and am trying to allow the user to upload files to a drop box on one machine and then have them transferred to another. So I form a group for two users: www-data which ...
8
votes
5answers
2k views

Can't apply chmod to a file

I have a file on my HDD, cd /media/celebisait/5AC69788C6976355 There is my file called myFile.tar.gz. I do als -l, -rw------- 2 celebisait celebisait 1387745311 Jun 6 2013 myFile.tar.gz ...
0
votes
3answers
477 views

How to compact a chmod UNIX command

Is there anyway to compact the follow UNIX command: chmod 755 scriptA.ksh | chmod 755 scriptB.ksh | chmod 755 scriptC.ksh | chmod 755 scriptD.ksh The above command makes every KornShell (ksh) ...
3
votes
1answer
135 views

What is chmod 6050 good for

Recently I came across to command: chmod -R 6050 /usr/lib/hadoop-yarn/bin/container-executor I don't know what that mean? I know file permissions like 777 etc. in a mode rwx for owner group others. ...
0
votes
2answers
60 views

How can I give a permssion to all users for a path using the octal notation?

I'd like to give execute permissions on a path recursively so I can read a file in the directory. The chmod binary that I'm using on Android only supports the octal/numeric notation though. Normally ...
1
vote
2answers
178 views

How to modify the permission of jar file exactly same as other machine jar file? [duplicate]

I have two machines, In my machineA I have a jar file with these permissions - -rwxr-xr-x 1 cronus app 16758150 2013-03-19 13:35 exhibitor-1.5.1-jar-with-dependencies.jar In my another machineB, I ...
4
votes
3answers
183 views

restrict student account permissions, give faculty access

I have set up two user groups, students and faculty on Ubuntu 12.04 and created a number of students and faculty accounts. The problem is a student can currently see & read all of the files of a ...
2
votes
2answers
143 views

Make script executable from vi/vim

How can I run chmod +x on the script I'm creating in vi/vim so that it is executable? I tried :r chmod +x % but it didn't work.
0
votes
0answers
71 views

MySQL Backup folder permissions - Non downloadable by others

I created a PHP script which takes backup of the mysql database every day and then saves it to a folder called "BkPath". All the backups will be saved here. But am trying learn the chmod command to ...
0
votes
1answer
2k views

how do I mount a CIFS share so I can fully control the mounted volume on the client

It's a simple question: but I am in much pain over this situation, so here is the question: How can I "mount" a share so that a) the share is run on boot b) that I can control things like chown/chmod ...
2
votes
1answer
36 views

How to copy permissions from owner to others using `chmod`?

Is it possible to recursively copy the permissions of owner to group and others for all files in a given directory? PS: my chmod is 5.97
1
vote
2answers
311 views

How to exclude hidden files in recursive chmod?

I am having to do chmod -R 755 some_dir where 'some_dir' contains '.git' folders. Is there any way I can exclude hidden files and folder when doing recursive chmod? Note: chmoding .git folder is ...
3
votes
4answers
1k views

permissions 755 on /home/<user>/

I am wondering why by default my directory /home/<user>/ has permissions set to 755. This allows other users to enter into directories and read files in my home. Is there any legitimate reason ...
3
votes
2answers
475 views

Chmod by Letters Vs Numbers

I was recently asked by a colleague to use chmod with letters instead of numbers. Apart from the obvious readability advantage is there any particular reason to use letters over numbers ?
2
votes
2answers
1k views

Unable to run 'sudo chmod +w /etc/hosts'

I am logged into my remote VM (running out of ESXi) as user xyz. I wanted to change my /etc/hosts to add some network names that were not visible by default. I first tried to run sudo vi /etc/hosts ...
1
vote
1answer
42 views

trying to search inside chmod with command [duplicate]

I am trying to find commands with the word "symbolic" inside the contents If I type man chmod and /symbolic you can see that chmod command has the line of "new modes of the file will ...
1
vote
1answer
247 views

Equivalent of full control, modify and write in linux

What is the equivalent of assigning Full control, Modify and Write permission, in Windows, to a particular user and group, in Linux? chgrp, chmod and chown seems quite limited in this case.
5
votes
2answers
64 views

Is there a flag corresponding to x/X, but for s with chmod on Linux?

When using chmod (in my case part of coreutils 8.12), and recursively setting the x bit, there exists the convenient X (uppercase letter x), to set the bit only on directories. So if you wanted to ...
2
votes
1answer
2k views

Change permissions for a symbolic link

I have a symlink with these permissions: lrwxrwxrwx 1 myuser myuser 38 Aug 18 00:36 npm -> ../lib/node_modules/npm/bin/npm-cli.js* The symlink is located in a .tar.gz archive. Now when I ...
1
vote
2answers
99 views

FS permission scenario

How can I achieve this files & folders permissions scenario: Consider these folder: Folder A: 640 root apache /var/www/A/ Folder www: 640 root apache /var/www/ and this linux user: id user1: ...
2
votes
2answers
366 views

How to hide someone else's directories from a user?

I have several folders: /home/user1/ -u user1 -G user1 /home/user2/ -u user2 -G user2 /home/user3/ -u user3 -G user3 I created three users user1, user2, user3. Each user has own group. Any user can ...
1
vote
1answer
745 views

Set default permisson for newly folders and files in Linux

I'm using OpenSuSE and my computer has only 2 accounts: root and me.I have a directory /srv/www/htdocs/abc. I just want to set it up so that when new folders or files are created in this directory ...
3
votes
3answers
1k views

How can I revert a chmod on the etc directory?

I accidentally executed the following command on the etc directory: sudo chmod -R 700 /etc I know that I have done something very wrong. My terminal now prints: I have no name!@ubuntu: /$ How ...