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

7
votes
3answers
22k views

How to check which Apache group I can use for the web server to write?

I'm trying to make Wordpress work. I currently have this error message: Could not create directory. /var/www/html/wp-content/upgrade/theme_name when trying to upload a theme. This is the ...
0
votes
2answers
13 views

Can I change the permissions of files that root has read only access to?

A few days ago I made the switch from Debian to Arch. When I did that, I backed up my files to an external harddrive. I've moved the contents of that backup to my normal harddrive. Now I'd like to ...
1
vote
1answer
61 views

Access manpage(2) on OS X

In Mac OS X, at the end of the chmod man page, it shows See also: chmod(2) But when I enter man chmod(2) It says that there is no such man page. How can I access the man page chmod(2) man page? ...
2
votes
5answers
346 views

Why can't I delete my files?

I copied some files from a data DVD to /home/emma (ext4), and all of the files are read only. This is what all of the files are like: emma@emma-W54-55SU1-SUW:~$ stat cd/Drivers/Drivers_List.rtf ...
0
votes
1answer
26 views

How to I allow direct write access to a directory under /home/username?

For some reason after reinstalling Debian 8 (LVM encrypted) I need to sudo for any writing command in certain directories of /home/manuel/ directory (not even all of them!). I tried chmod a=awx [-R] ...
0
votes
1answer
54 views

Clarification: permission and owernship by the apache process of web root

I've read through a lot of articles about correct/secure (1) ownership and (2) access permissions for directories and files in a web accessible directory served by apache (e.g. /var/www/). Either I'm ...
1
vote
2answers
26 views

Adding others rw permission to file

I have list of file with permission -rw-r-----. I want modify this permission and give access to other. i.e -rw-r--rw- Without modifying current permission setting, just add permission to 'other' ...
1
vote
2answers
62 views

Accidentally changing permission of '/' directory to 'chmod 660 '

After executing $ sudo chmod 660 /, I can't login with any of the users besides root. How can I restore the permissions ?
2
votes
2answers
2k 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 ...
12
votes
1answer
831 views

Root can't chmod?

In my department we have a small file server with CentOS and samba. I have root access to be able to perform some basic maintenance. Today I was making some folders read-only, so I went ahead and did ...
3
votes
1answer
183 views

files saves to ntfs drive adhere to umask, ext4 does not

I have 2 storage drives, 1 is NTFS and the other is ext4. Both mounted in /media as Storage_1 and Storage_2 I've run chmod -R *user*:*user* /media/Storage_* I've tried putting umask=022 in /etc/bash....
0
votes
0answers
16 views

chown vs chmod shared directories (NPM)

If several people are on a Linux box and one user issues chown commands on some shared folders (this has to with Node.js/NPM global files), aren't they competing with each for permissions? Is it ...
4
votes
0answers
61 views

Linux: Changing Permissions – No space left on device

I have an external drive. When I just plug the drive into the PC, with a default /etc/fstab file, the OS just detects it and it's there in the Dolphin browser. I can select it, I can navigate to it on ...
1
vote
0answers
68 views

Changing permissions of the file, while using sftp command in a shell script

How can I change the permissions of the file/command, while using the sftp command via a shell script? My sftp connection is established, but it fails while executing the chmod command. As of now, I ...
8
votes
4answers
24k views

'chmod g+s' command

Hello I want to understand the role of the chmod g+s command in Unix. I also would like to know what it does in this particular context: cd /home/canard; touch un; chgrp canard .; chmod g+s .; touch ...
0
votes
4answers
82 views

Is there a way to show the permissions for a file without using `ls`

That's all - just wondering if there's other way to find out the permissions for a file without doing a ls -l to see the string of values there. As far as I know, there's no show option in chmod.
2
votes
1answer
143 views

RHEL sudo still not allowed for user 'tina' [duplicate]

I'd like 2 users, 'tina' and 'lu' to execute a few utils like /bin/chmod. Here's the relevant portion of my /etc/sudoers file. tina,lu ALL=/bin/chmod /bin/chown /bin/chgrp Then I logged in as ...
0
votes
2answers
32 views

Confused by this chmod command [duplicate]

Why does the command chmod 6754 correspond to the file permissions rwsr-sr-? I understand that Read = 4, Write = 2, and Execute = 1, but what value does the s (setuid) permission or the dashes have?
1
vote
2answers
39 views

Finding files and directories with different umask

I have an umask as a 0002 using umask -S it returns u=rwx,g=rwx,o=rx. How do I find all files and directories that does not have rights set up according to mask? The directories goes 777 - mask and ...
0
votes
1answer
56 views

Cannot Bash chgrp GROUP /home/*/SOMEFILE/ How to do it?

So am setting a code that will change group owner of the file to a specific group. PS there are more than 10 users, with same folder and file structure, and i want change the ownership of a specific ...
1
vote
1answer
29 views

Why is chmod recursively changing file permissions as well?

When I do chmod _+x -R /dir where "_" is any combination of (u,g,o,a), if after I do chmod g+X -R /dir, the files gain executable permissions as well. Why does this happen? This behavior only ...
0
votes
2answers
64 views

Issued chmod 666 * in home directory, permissions problems resulted with all files

I was attempting to give any regular user access to two folders that reside a few branches down in my home folder. I thought I was in the correct directory and typed out sudo chmod 666 *, but ...
3
votes
3answers
54 views

What are the conventional file permissions per filetype before umask is applied

I am looking for a list that specifies the conventional file permission of all the different file-types before the umask is applied. I read in man 1p touch that the default for a regular file is: ...
3
votes
2answers
85 views

Restrictive “group” permissions but open “world” permissions?

I understand that with Unix file permissions, there's "user", "group", and "world" octets. For the sake of this discussion, let's assume that setuid/sticky bits don't exist. Consider the following ...
0
votes
0answers
56 views

Ubuntu 15.10 system rescue on Busy Box after botched Deja-Dup backup attempt

I received an external hard drive for Christmas and attempted a backup of the home directory of my Ubuntu 15.10 system. Unfortunately, I botched it, and when I came back to the computer to check how ...
21
votes
4answers
12k 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?
0
votes
1answer
30 views

How do I achieve this task of creating a shared folder and controll newly created files [duplicate]

I am attempting to conceptualize how to go about solving this task. First, here is the task in full. RHCSA7: Task of the day Allowed time: 10 minutes. Create two new user accounts "steve" and "...
0
votes
1answer
37 views

Minimum file permissions to rename file

I put a 64-bit ELF file in my unprivileged user's home directory. I wonder which permissions do I need to have only possiblity to rename this file being logged in as unprivileged user. From what I ...
0
votes
1answer
53 views

trouble understanding GID and chmod g+s

I am having trouble understanding the GID and the command chmod g+s I read this as setting the permissions of the passed file or directory, for the group, as +s (sticky im assuming?) Does the +s mean ...
131
votes
9answers
19k 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 ...
1
vote
1answer
49 views

How to give write / create right to not yet existing files w/o write access of the parent directory?

I don't know if this is even possible so I need to ask. I'd like to allow a single file to be created by a user (a flag-file) but only that file should be able to be created. As I have the parent ...
1
vote
0answers
42 views

rsync + chmod only selected files

I'm trying to sync specific cron files between 2 servers and change the permissions for them. However, the command I am trying is also changing the permissions on the main directory. Command used: ...
0
votes
1answer
28 views

Samba unix permissions messed up despite mask

I'd like to configure a share on a standalone samba serve where users have rw to their own files, but r to others in the same group (rwx and rx on folders respectively). It works well when users ...
-1
votes
2answers
39 views

Why would a user not be able to delete a file they created

Reposting the question about deleting a file. We have a script that is used to transfer files between two SCO Unix systems. The script has been rock solid for years. Recently the firewall unit at ...
0
votes
1answer
35 views

executable files to normal files via terminal CentOS7

Today I copied some files from the shared folder (Host is a Win7) to my VM ( Guest is a CentOS7). I did this with root permissions. Then I copied th files to my apache location /var/www/html/test I ...
1
vote
4answers
81 views

Why do I need to set some file as executable?

I never went outside of windows before last week, I was asked to make a VM with elasticsearch/logstash/kibana/jdk8 on it. I'm using a regular non sudoer user. I extracted each tar.gz file and got 4 ...
0
votes
0answers
39 views

ownCloud permissions wrong

I've got ownCloud running in a FreeNAS jail and it worked flawlessly until I rebooted the system. Now I get an error saying: The datadirectory (/media) is readable for other users. Change the ...
1
vote
1answer
35 views

SUID has no effect on directories with Linux

Why does the SUID bit have no effect when applied to directories in Linux? I clearly see that I can set it with 'chmod u+s'. But why does it not have "any" effect. What is the reason for implementing ...
2
votes
0answers
53 views

Permissions (ACL) to allow creation of new files only - are extended attributes also needed?

I want to use a directory as a sort of drop-off point, similar to the Public folder in each Mac OS X home directory, that is: certain users (or everyone) should be able to create new files inside this ...
6
votes
1answer
6k views

Difference between “chmod 775” and “chmod 2755”

What is the difference between "chmod 775" and "chmod 2755"?
3
votes
2answers
110 views

Fix files with ????????? permissions

I wrote a script to change permissions on all files in a directory: #!/bin/bash files=`find "$1"` for f in $files; do chown "$2" "$f" chmod 600 "$2" done Obviously, the second argument to ...
1
vote
1answer
147 views

Directory permissions “r-s”, chmod 655 does not change to “r-x”, why?

I created a directory in my home directory. and I set its permission as follows: uhmwk.1.4$ chmod 655 dog uhmwk.1.4$ ls -l total 4 drw-r-sr-x 2 s9 s9 4096 Feb 14 21:57 dog why is the group ...
0
votes
1answer
161 views

command not found error after giving permission to access file using chmod

I've been trying to run a script using chmod. Here's how I tried to execute the script: $ chmod u+x tester $ ./tester ./tester: Command not found. I always get the Command not found error and I'm ...
1
vote
2answers
87 views

How to give this permission (-r--rwx-rw-) using CHMOD? [duplicate]

I am studying for a public exam and see this question (pt-BR) Before answer, I read about chmod and understood that the permission are split in 3 groups (user, group, other), like this: Nível u ...
0
votes
1answer
49 views

Change Permissions for a Specific User

Im new here. I have a question about changing permissions of a file. We have user1 user2 user3 and we have a "xx" file. xx files remoting by root and group1. ı have to give a writable and readable ...
1
vote
4answers
57 views

File permissions on data backups

After making a rm related mistake on some of my files (which was fine because I have backups), I started thinking on how I could limit myself to making such mistakes. I have not done anything with ...
0
votes
1answer
232 views

SSH Key Permissions Chmod settings?

I need to use SSH on my machine to access my website and its databases (setting up a symbolic link- but I digress). Following problem: I enter the command: ssh-keygen -t dsa To generate public/...
0
votes
0answers
13 views

SSH Permissions in Linux Mint [duplicate]

I need to use SSH on my machine to access my website and its databases (setting up a symbolic link- but I digress). Following problem: I enter the command ssh-keygen -t dsa To generate public/...
3
votes
2answers
3k 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 ...
2
votes
2answers
37 views

Lock A Built-in Application?

I know I am able to lock an application using: sudo chmod a-x /Applications/'Application'.app but I encountered a problem while trying to lock an application, like safari, which is built in. ...