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

0
votes
3answers
334 views

Directory appears as file?

So we copied some photos in a directory across to a NTFS partition last night, and they were viewable from ubuntu. Today the directory is not accessible from Windows, and when we booted back into ...
0
votes
1answer
54 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 ...
4
votes
3answers
2k views

Why can't I run programs on another partition in Linux?

So for convenience, I store all my data on my Windows partition so that I can access my data easily from both Linux and Windows. However, I tried compiling a C++ program with g++, and found out that I ...
28
votes
4answers
4k views

How to recover from a chmod -R 000 /bin?

And now I am unable to chmod it back.. or use any of my other system programs. Luckily this is on a VM I've been toying with, but is there any way to resolve this? The system is Ubuntu Server 12.10. ...
9
votes
4answers
5k views

How to get permission number by string : -rw-r--r--

I need to set the same chmod, how to get number for -rw-r--r-- ?
1
vote
2answers
59 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 ...
101
votes
6answers
6k views

How to chmod without /usr/bin/chmod?

Today I was told a tale by a Unix trainer, a tale where the root password got leaked to the students, and one of the fellas removed the execute permission from /usr/bin/chmod itself. How do you ...
2
votes
4answers
100 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
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 ...
4
votes
1answer
122 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
0answers
102 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: ...
1
vote
1answer
727 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 ...
8
votes
3answers
21k views

Recursive chmod only folders or only files via script or nautilus menu?

This has been discussed before here. What I'd like to know is how to turn these: Recursive chmod only files within this folder: find . -type f -exec chmod 0600 {} \; Recursive chmod only folders ...
2
votes
1answer
49 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
276 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, ...
2
votes
7answers
3k views

Convert ls -l output format to chmod format

Say I have the following output from ls -l: drwxr-xr-x 2 root root 4096 Apr 7 17:21 foo How can I automatically convert this to the format used by chmod? For example: $ echo drwxr-xr-x | ...
2
votes
4answers
77 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
4answers
703 views

chmod - change permissions on a file

I have a Python virtualenv, and the Python executable is located in the /bin directory. In this virtualenv I'll have to execute some unsafe code, that can damage my system. I tried to chmod a-r on the ...
1
vote
1answer
55 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 ...
1
vote
2answers
128 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 ...
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
1answer
51 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 ...
1
vote
0answers
215 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 ...
1
vote
3answers
106 views

Reverse a chmod command on a directory

Is there a way to undo a chmod command on a directory in CentOS ?
-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) ...
1
vote
2answers
975 views

Find all directories, in which user has access to search and echo this directories in shell

I need to find all directories, in which user has access to search(command find) and echo this directories in shell. USER is read from ksh. for example: read user I know, if user want to use find ...
0
votes
2answers
120 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 ...
4
votes
1answer
260 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 ...
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: ...
2
votes
1answer
4k views

Why can I not chmod a file?

[nathanb@ka /x/sim/nathanb/nbsim1] ls -al ,nvram -rw-r--r-- 1 root root 2097152 Jul 5 2011 ,nvram [nathanb@ka /x/sim/nathanb/nbsim1] sudo chmod a+w ,nvram chmod: changing permissions of ...
1
vote
2answers
302 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
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
440 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
214 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 ...
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
147 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
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 ...
3
votes
1answer
134 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
3answers
461 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) ...
1
vote
2answers
175 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
182 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
69 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