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

5
votes
2answers
2k views

If I change permissions on a tar file, will that apply to the files inside it?

I have a script that runs regularly via cron, that creates a tar.gz file for the purpose of backing up a directory. For reasons beyond my control, the only user who can execute the script via cron is ...
3
votes
4answers
297 views

Run a given command on every subpath of a long path

Say I have a long path such as: /a/b/c/d/e/f I would like to run a command only on each of the subpaths of the path: e.g. If my command is cmd, I am looking for a one-liner that can do (perhaps ...
1
vote
4answers
808 views

grant permission in linux

I have a linux web server with 2 hard-drives. There are 2 users, one can access /home/user1 and the other user can access /home2/user2 I would like to grant user1 permissions to access /home2/users/ ...
0
votes
1answer
757 views

Chmod u-x isn't changing anything and I have no idea why

I'm a user on a Debian machine. When I create a file in my home directory, the default permissions appear to be 700, even though umask returns 0022: eulerz@foo:~$ touch testing eulerz@foo:~$ ls -l ...
7
votes
1answer
163 views

Make group permissions same as user permissions

I want to set the group permissions for all files and subdirectories within a certain parent directory to whatever the user permission setting for that specific file or directory is. For example, ...
5
votes
1answer
630 views

Can't get directory listing of folder I have permissions to

I was having some permission problems and used the following command on directory Media: chmod -R ugo+r Media It didn't help so then I did: chmod -R 775 Media Now I get this error when I try to ...
4
votes
2answers
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 ...
3
votes
2answers
520 views

How to make a folder request root password to view execute?

I am running Ubuntu 10.04 LTS. I want to use my laptop to play music in a party. MY screensaver does not need a password to deactivate. I would like to allow people to use my computer to play the ...
1
vote
2answers
159 views

is setting a 0 permission on a directory an effective way to protect its contents?

Let's say that permissions for user and group are set up correctly on a directory. Would a 0 permission for other on that directory provide effective access control for the directory's files and ...
2
votes
1answer
194 views

chmod -R 644 ~/Documents

I recently noticed that all of the files in my ~/Documents were somehow incorrectly given executable status. This proved annoying as trying to opening any file gave me a message box saying it was ...
5
votes
3answers
438 views

Unix users, groups, and permissions

I don't understand unix users, groups, permissions, etc. For example, things managed by the chmod, chgrp, usermod, groupadd, etc. commands. How do all these things work?
5
votes
3answers
2k views

Write access without read access

Is it possible for a user to have a write access to a file and not be able to read it? How is it possible? I tried the following commands: debianbox@debian:~/posix/io$ touch filetest ...
5
votes
2answers
1k views

recursively change file permission but not directories?

I was doing a mass recursive change of permissions of some files that I had migrated to a unix system. I changed them to ug+rw, but then I found that I could not traverse subdirectories. I looked at ...
3
votes
1answer
345 views

Vanishing permission on device file (RHEL 6.1)

I want to set world read/write permissions on a raw block device file (yeah, I know). I can set the permission to 666, but it goes back to 660 immediately after I touch it or write to it. Why? ...
1
vote
1answer
163 views

Do we need to chmod a shell script before it can be rsh

I tried to rsh a shell script from OpenVms to a Red Hat linux. It seems that it is not executed. I created the shell script in OpenVms and Ftp it to the linux. I then ls -la the folder in linux: ...
1
vote
1answer
574 views

Temporary Permissions when installing DokuWiki?

I'm trying to upgrade to the latest version of DokuWiki, and I'm finding that the easiest way to do this is to install the upgrade plugin and just click a few buttons. But there are permissions ...
4
votes
2answers
318 views

Directory special permission problem

When I write: chmod g=rws,u=rwx,o=rx folder_name I get: drwxrwSr-x But S is not the same as s, right?
13
votes
3answers
2k views

I accidentally chmod -R +x on a directory. How do I restore the correct permissions?

Well, to be specific, it was chmod -R 755. Now every file is executable, which I don't want. I am thinking that I should look at the first two bytes of each file for the #!, but will this cover ...
8
votes
4answers
5k views

Is there a web based converter between rwx and the octal version?

I can never remember what the conversion is from something like rw-r--r-- to 644. Is there a simple web based converter between the 2?
14
votes
1answer
4k views

What is the first chmod octal digit in a four-digit value for?

Sometimes I see chmod commands that use four octal digits instead of three -- what is the optional first digit for? For example, chmod 777 is equivalent to chmod a+rwx; what's the same command for ...
7
votes
2answers
602 views

How are file permissions calculated?

Using chmod I could set the permissions for a file, but if the parent ( .. ) directory had conflicting permissions, what would happen? And if I create a new file, using touch or something similiar, ...