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

-2
votes
2answers
66 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
180 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
27 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 ...
1
vote
3answers
114 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
36 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
61 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
72 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
72 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
104 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
37 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
23 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
46 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
48 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
900 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
100 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
84 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
45 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
89 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
127 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
126 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
44 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
459 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
28 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
135 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
391 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
294 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
476 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
37 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
134 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
53 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
147 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
89 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
169 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
224 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
641 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 ...
92
votes
6answers
5k 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
3answers
135 views

Safer way for granting permissions for self user?

I know sometimes we can do chmod 777 so we have a directory at our complete reach for accessing, reading and writing. But usually I prefer to do a sudo chown {myusername} {directory}. Obviously, the ...
2
votes
3answers
249 views

'setfacl' permissions don't apply to directories created by git clone?

Here's how I am setting permissions for my website's root directory i.e. ~/public_html, where the files that my website serves are placed: sudo chgrp -R www-data ~/public_html chmod g+s ~/public_html ...
0
votes
3answers
246 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 ...
5
votes
4answers
456 views

chmod recursive permission on thousands of files

This is a more general question about 'chmoding' recursively. I have this script which at some point needs to change the permissions recursively in a folder which has a few hundred thousand files. ...
0
votes
1answer
31 views

how to display I/O file on shell [closed]

I am writing shell script and I need to display my output at the same time however it doesn't work with 2> somefile.txt and if I do | tee -a somefilel it will not overwrite which I need to . <> ...
1
vote
1answer
156 views

Permission error to access mounted directory in localhost

OK, I formatted my flash to ext4 file system, changed all the permissions to 777 and mounted it to /var/www/html/web. Now, when i access localhost/web it gives the following error: "You don't have ...
1
vote
1answer
117 views

Changed file access to read only but I can still write to the file. Why?

I am running a small embedded system built using buildroot. I have come across this strange behaviour when trying to set up my file permissions on the target device. To illustrate what confuses me I ...
27
votes
4answers
3k 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. ...
0
votes
1answer
70 views

Removing access privileges to backup while maintaining current setup

I have a giant directory, and I am dealing with a backup. I would like to store this backup in as safe of a way as possible. One of the ways of doing that is removing rwx privileges through chmod. ...
1
vote
1answer
611 views

Safe to change owner of OS X system folders?

I'm trying to get Homebrew to work. That program's diagnosis tool gives me these suggestions: You should probably chown /usr/local/etc ... You should probably chown them: ...
2
votes
2answers
1k views

Unable to change permissions of file system root

When I write ls -la the output is : tusharmakkar08-Satellite-C660 tusharmakkar08 # ls -la total 88 drwxr-x---+ 10 root root 4096 Apr 18 19:43 . drwxr-xr-x 4 root root 4096 Mar 18 17:35 .. ...
1
vote
1answer
99 views

chmod allowing write when I am not setting it

I've got a perl script which systematically changes permissions. The first thing the script does is remove all permissions. It does this by calling chmod(from perl). I did this as I found the set guid ...
3
votes
2answers
82 views

How can a user restrict their own group rights without being root?

How can I change my user rights from rwx to r-x at the group level? I'm trying to ensure that I cannot touch any data belonging to other users when I am developing and debugging my scripts. Once I've ...