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
1answer
803 views

No effect of umask and chmod on mounted drives

The windows drives are mounted at boot-time using pysdm. The setting were nls=iso8859-1,users,umask=002,sync,user,dirsync,uid=mtk When I try to change the permission of files using chmod, I don't ...
1
vote
2answers
705 views

Fedora 14 command line: assign folder permissions

How can I assign folder permissions in Fedora 14 using the command line? I'd like to give read/write/execute permissions to : 2 users (tom, jim) to the folder /Home/Share 1 group (employees) to the ...
4
votes
4answers
2k views

Is chmod behavior wrong for symlinks?

Recently we had a problem on a Red Hat Linux box with many users: the /usr/bin/sudo binary has lost its sticky bit. Work was blocked until root user fix it (we need sudo for deploying and testing). ...
5
votes
2answers
3k 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
325 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
877 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/ ...
1
vote
2answers
4k views

Giving PHP permission to write to files and folders

UPDATED FOR FURTHER CLARITY: According to http://expressionengine.com/user_guide/installation/installation.html, it says: For most Unix hosts the following is typical, but you may check with your ...
0
votes
1answer
865 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 ...
8
votes
1answer
223 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, ...
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
555 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
171 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 ...
22
votes
9answers
4k views

Why use `chmod 644` instead of `chmod u=rw,go=r,…`?

I've been working on *nix for a few years now, and one of the things I just can't get used to is octal permissions in code. Is there some other reason than line length to prefer chmod 644 ... over ...
2
votes
1answer
214 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 ...
1
vote
4answers
680 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 ...
5
votes
1answer
719 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 ...
5
votes
3answers
3k 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 ...
4
votes
1answer
1k views

copying device nodes

I'm trying to transfer a working Linux installation to a new larger disk, so I've attached the new disk on a USB port, partitioned it and created filesystems. While copying all the files over I hit a ...
5
votes
2answers
2k 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
364 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
170 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: ...
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 ...
12
votes
3answers
4k views

Wrongly set chmod / 777. Problems?

I was trying to run chmod -R 777 ./ but ended up typing chmod -R 777 / and set 777 on my entire machine. What can go wrong? How can I fix it?
4
votes
2answers
415 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?
1
vote
1answer
663 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 ...
6
votes
1answer
3k views

Is NTFS under linux able to save a linux file, with its chown and chmod settings?

I'm having some doubts about how to install and allow linux to correctly read/write to a NTFS formated harddrive used as backup of various machines (windows included, that's how I need NTFS). For now ...
9
votes
4answers
6k 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?
16
votes
1answer
5k 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 ...
16
votes
2answers
2k views

How to apply recursively chmod directories without affecting files?

After I apply chmod -R to a directory, permissions are changed for everything within (files and directories). How can I add execute/search (x) permissions to directories without modifying the files?
5
votes
3answers
460 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?
7
votes
2answers
655 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, ...
5
votes
4answers
978 views

recursively chmod

I was trying to chmod folders and files with: find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; But I was wondering: How to do it in one line using find and excluding the ...
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 ...