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

Preventing user from accessing parent folders [duplicate]

I have a user who I only want to be able to access /var/www/ucp/ (his home directory). I have executed the following command on the / directory, the /var/ directory and the /var/www/ directory: chmod ...
1
vote
2answers
48 views

assigning read/write privileges for a folder to a user in CentOS 7

I am logged into a CentOS 7 server as root. I created a folder /somefolder. I want someusername to be able to write to that folder via scp from a remote computer. What command should I run so that ...
1
vote
0answers
17 views

tracking directory permission changes

Permission of a certain directory named 11203 got changed twice bcoz of which the hosted app encountered some problems. When i used the command.. ausearch -i |grep chmod |grep 11203 I got the ...
1
vote
1answer
47 views

How to give permission to group to read/edit unowned files on archlinux?

I'd like to be able to read files from external hdd or other partitions without having to su root every time or chmod the whole partition to myself/group. How can I give myself/group permission to ...
1
vote
1answer
56 views

How can a user be prevented from changing a file that has write permissions for other users?

An odd situation came up recently. User1 needed to be able to change files in a directory were the files and the directory were owned by User2 and in group User2. In order to facilitate this ...
1
vote
1answer
210 views

chmod: cannot access 'file' : No such file or directory error when the file exists

I downloaded and saved 2 files on Linux tails live os. I have set the appropriate permissions on those 2 files to allow them as executable. This is the command I used. sudo chmod 777 ...
0
votes
1answer
49 views

How do I search for every file with executable permission (+x) in my system? [duplicate]

I need to find every single file that has executable permissions in my system, i think they end with x@. I tried to ls every file and then grepping the output to match files with x@. Like this: ls ...
1
vote
3answers
62 views

chmod command to set a file as permission denied

I want my file not to be deleted by any user. Can I know the chmod mode command for the same? I need to get this kind of msg (rm ctl_model_fact.csv: Permission denied)
2
votes
3answers
118 views

print the /etc/shadow file in the console

How do I change the permissions of an executable file to access the /etc/shadow file? So far I have the following bash script: #!/bin/bash gcc print.c -o print chmod +s print ./print exit 0 and ...
0
votes
1answer
43 views

Executable directory? And chmod o+w changing the terminal directory color?

What does an executable directory mean? If o+w is set the directory changes colors to a background green, what does this mean? Why doesn't it do it for ug+w, but only for o+w? Additional question ...
6
votes
2answers
1k views

What is the result of running `chmod 7` on a file?

I know chmod 777 allows read, write, and execute for user, group, and others but what if I just do chmod 7? Is that only rwx for the user?
0
votes
2answers
68 views

Do I need to chmod 777 mounted volumes?

I have an openstack VM with the following users: [foo@influxdb ~]$ id root uid=0(root) gid=0(root) groups=0(root) [foo@influxdb ~]$ id foo uid=500(foo) gid=500(foo) groups=500(foo),10(wheel) ...
0
votes
3answers
27 views

Setting global browsable permissions for subdirectories (r-x) but making files inaccessible to everyone but the owner and group members

I typically have a directory where I want all users to be able to browse through but having files be unreadable and unexecutable. I see some related questions that do not exactly match what I want: ...
2
votes
1answer
80 views

ssh as super user

I did the following mistake on a remote server : # sudo chmod 700 / Now no user but root can do anything. I can't even ssh as a normal user anymore, since I don't have permission to access bash. ...
1
vote
1answer
144 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
229 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
196 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
3answers
414 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 ...
2
votes
1answer
200 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
341 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
211 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
161 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
198 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
173 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 ...
2
votes
1answer
231 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
121 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
399 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
79 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
570 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
248 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
24k 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: ...
2
votes
1answer
141 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
1k 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
527 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
180 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
109 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
89 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
253 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
59 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
69 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
6k 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
851 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
200 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
78 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
303 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
275 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
171 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
120 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
3k 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 ...