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

0
votes
0answers
15 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 ...
0
votes
0answers
16 views

Lock icon on folders and chmod not working

In my pen drive all folders and files have lock icon on them. But when I tried to change the permission by sudo chmod 777 -R /media/backbox/BB65-5FC4 the permissions didn't change. Instead I got ...
3
votes
0answers
46 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 ...
0
votes
1answer
45 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
0answers
35 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 ...
6
votes
4answers
21k 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 ...
7
votes
3answers
21k 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
4answers
77 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
134 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
22 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
36 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
50 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
28 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
44 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
49 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
81 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
11k 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
29 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
32 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
44 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 ...
129
votes
9answers
18k 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
45 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
32 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
27 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
31 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
78 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
31 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
33 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 ...
1
vote
0answers
47 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
89 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
111 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
2answers
135 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
78 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
55 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
183 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 ...
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 ...
2
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
30 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. ...
0
votes
2answers
127 views

How to recursively change permissions on all directories inside current directory?

How can I change folder and file permissions for all files and folders recursively inside current directory? I am not sure, why, but my command fails with this output: chmod: missing operand after ...
2
votes
2answers
438 views

Permanently change permissions of /var/run/postgresql

On Linux Mint 17.0 Cinnamon Edition, I want to use /var/run/postgresql as the unix_socket_directories option for all of my postgres databases. Whenever I run the command pg_ctl -D postgres-data -o ...
0
votes
0answers
31 views

What is the effect of rsync with -E and --chmod?

Reading through a script I came across an rsync command with the following flags: -rtlDE -c --delete-after --chmod=u+rwX,go-rwx /path/to/dir1/ /path/to/dir2/ Background: I am refactoring the ...
3
votes
1answer
11k views

I can't seem to remove a file even after changing ownership and permissions [duplicate]

Haven't been here much. Mostly Stackoverflow. Anyway, I have a file that I can't remove. I tried sudo rm files.db and got Operation not permitted Did sudo chown me: files.db Then sudo chmod 777 ...
3
votes
2answers
419 views

reset permissions back to default

How can I reset permission to default according to the mask, so they will have permissions set as the file was just created Example of what I want to achieve: umask is set to 0022 so touch file ...
3
votes
2answers
65 views

Changing file permissions according to their names

I created 512 files, with names made from combinations of permisions (r, w, x). I created them like this: touch ./{r,-}{w,-}{x,-}{r,-}{w,-}{x,-}{r,-}{w,-}{x,-} and I want the files to have same ...
12
votes
3answers
7k 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 ...
0
votes
0answers
19 views

How to give write access for overlay fs?

Should i change rights on mount point, or workdir or both? Should i use commands (to give write access for all users) find . -type d -xprint0 | xargs -0 chmod 777 find . -type f -xprint0 | xargs -0 ...