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
2answers
801 views

chmod wont work - no error message

Everytime I try to change the permissions of a file with chmod on my Ubuntu with a command like chmod 744 /media/DATEN/Dokumente/Coding/Python/DirFileFuncts.py it doesnt work. I tried octal and =rwx ...
1
vote
1answer
1k views

Allow all group members to create directories and files

There are 2 users sftp_user apache Both users belong to the updaters group as well as other groups. New directories and files are created in the /updates/ directory. drwxrwsr-x 8 sftp updaters ...
1
vote
0answers
141 views

External HDD read/write permission changing from a cron job

So, I run an overnight python script that runs a backup of our web data in the /var/www directory, then moves the backups to an external HDD in /media. The script in scheduled in the sudo crontab ...
4
votes
2answers
6k views

Why does “chmod 1777” and “chmod 3777” both set the sticky bit?

To set the sticky bit on a directory, why do the commands chmod 1777 and chmod 3777 both work?
1
vote
1answer
113 views

Securely running LAMP under a specific user

I'm setting up a sandbox type of server that will be used by a couple users as a development environment and knowledge base. The server will have a web frontend so I've installed Apache, MySQL and ...
3
votes
1answer
163 views

Change who is able to chmod

Is there a way to change who can chmod (change the permissions of) a particular file? It is only the owner of the file (without sudo-ing it), if my experimentation has been correct? But what I want ...
2
votes
1answer
332 views

What does it mean if a directory has only x (executable) permission for certain user/group?

I stumbled across the directory /etc/ssl/private on Ubuntu (12.04), it has following permission: drwx--x--- 2 root ssl-cert 4096 7月 8 2012 private/ I wonder what does this mean for group ...
0
votes
1answer
246 views

Unable to change file permissions [duplicate]

Possible Duplicate: No effect of umask and chmod on mounted drives I am not able to change file permissions using chmod from the user who owns the file as well as from root. I am using ...
4
votes
1answer
542 views

Clear setuid permission using numeric mode

On an Ubuntu Linux I have a directory with the setuid bit set (drwsr-xr-x) which I want to unset. Neither chmod 755 nor chmod 0755 nor chmod 00755 (I though maybe the first 0 is interpreted as just ...
1
vote
2answers
870 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 ...
2
votes
1answer
411 views

Hide parent directory but allow to view dir

I would like the following result on my UNIX system: ls -l /users/test -> permission denied, or any other way so I can't see the content of it. ls -l /users/test/testdir/ -> shows all files in the ...
5
votes
1answer
3k views

what is the difference between “chmod 775” and “chmod 2755”?

Question What is the difference between "chmod 775" and "chmod 2755" ?
6
votes
4answers
4k views

When does chmod fail?

Under what circumstances will chmod fail? I looked at the man page but it only specifies usage and doesn't go into details about what circumstances it won't work in. I'd assume chmod will work if: ...
3
votes
1answer
171 views

How to create a folder which will change its contents’ ownership to what the folder has?

In a GNU/Linux OS there is no way to change ownership of a file until you are root. But what if I want to hide my system’s username e.g. before sending a file to someone, because some things like tar ...
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 ...
2
votes
4answers
4k views

How to make executable of all files excluding a few file types?

I have a folder containing many C source file and the same number of its compiled output files. I set executable bit to all this files but for some reason it was lost, making them not executable. (I ...
2
votes
4answers
9k views

How to permanently change the file/directory permission [closed]

How do I change the permission of file/directories such that I am able to create, edit, delete files/directories anywhere in my system? Currently I am using Ubuntu 12.04. I tried sudo chmod 777 -r ...
16
votes
2answers
12k views

Get the chmod numerical value for a file

In FreeBSD and also in Linux, how can I get the numerical chmod value of a file? For example, 644 instead of -rw-r--r--? I need an automatic way for a Bash script.
2
votes
3answers
163 views

User with read access to /home

Pardon my ignorance but I can't seem to come up with a solution to this one. I'd like to create a user that has read access to every user's home catalog located in /home. Do I need acl's for this or ...
1
vote
1answer
473 views

External drive chmod does nothing

Why is it that I can do chmod on my files when they are on my laptops hard drive, but when i make files on my external drive, i can't change their access rights. I do: chmod 755 somefile, and on my ...
2
votes
3answers
2k views

Change Folder Permissions

I started off with changing to the folder I want to change permissions for, and that is the opt folder. $ cd /opt/ test@testVM:/opt$ So I tried changing the permissions for this folder now using: ...
3
votes
1answer
990 views

Giving SSH users read-only access to a directory

I'm running Fedora 17 and I want to give several users access to files on my secondary hard drives on /run/media/haukur/. This is what I initially did: chmod -R 755 /run/media/ But every time I ...
5
votes
2answers
621 views

vim: create file with +x bit

Is there any way to set +x bit on script while creating? For example I run: vim -some_option_to_make_file_executable script.sh and after saving I can run file without any additional movings. ps. ...
16
votes
2answers
3k 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?
2
votes
2answers
638 views

execute bit on directories, but not files [duplicate]

Possible Duplicate: How to apply recursively chmod directories without affecting files? What is the command to apply execute permission for directories (for traversal), but leave the ...
4
votes
1answer
10k views

chmod: What does the `+a` parameter mean?

I was following a tutorial and it told me to run sudo chmod +a "SOME_PARAMS" some/dir I was surprised to see that fail telling me chmod: invalid mode: `+a' So I wonder: What does the +a mode ...
2
votes
1answer
938 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 ...
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
362 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
914 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
986 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 ...
9
votes
1answer
281 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
794 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 ...
3
votes
2answers
586 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
186 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
250 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
482 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
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 ...
7
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
385 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
176 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
810 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
619 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?
14
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 ...
16
votes
1answer
6k 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
733 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, ...