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
40 views

shell or perl script to check group have read privileges

ls -l drwx------ 8 ws web 1024 Apr 29 2013 abc drwxr-xr-x 8 ws web 1024 Oct 19 2011 def I need some script to find directories like abc which doesn't have read/execute permissions ...
1
vote
1answer
30 views

Linux Root group change chmod for root owned to 770

I'd like to have normal user account assigned to root group (which I've done already) and change mod of all files that are owned by root user to 770, If I understood it well in result of that every ...
2
votes
1answer
44 views

How to delete stubborn directory?

I'm having issues with dropbox so I'd like to uninstall and reinstall it. To do so I need to remove ~/.dropbox-dist but no matter what I do it won't budge. If I run ls -l I get: drwxr-xr-x 3 user ...
1
vote
2answers
74 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 ...
1
vote
1answer
45 views

How to create a Samba share that is writable from Windows without 777 permissions?

I have a path on a Linux machine (Debian 8) which I want to share with Samba 4 to Windows computers (Win7 and 8 in a domain). In my smb.conf I did the following: [myshare] path = /path/to/share ...
0
votes
1answer
28 views

What's the inverse of the X mnemonic in chmod?

Is there a way other than find … -type f -exec chmod -x {} + to remove the x bit from u, g and/or o recursively with just chmod? The X mnemonic in chmod allows one to recursively set permissions on a ...
5
votes
3answers
271 views

How do Linux permissions work when a process is running as a specific group?

This is something I haven't been able to find much info on so any help would be appreciated. My understanding is thus. Take the following file: -rw-r----- 1 root adm 69524 May 21 17:31 ...
0
votes
1answer
20 views

File Permissions issue from same group

I have a folder that I haven't created and belongs to a web-group group. Even though my username is under that group I can't modify files or create new ones without doing sudo. When I do the ...
1
vote
3answers
48 views

How to change the permission and group-owner of a file at the same time

For changing file permission, I know I could use chmod. For changing group-owner, I could use chgrp. However, if I want to change both permission and owner at the same time, any command I could use on ...
0
votes
0answers
32 views

kickstart does not chmod a file in %post section

I have the following code executed in the %post section of a kickstart file for RHEL 6.6. echo '#!/bin/sh' > /root/add_user echo 'if [ $# -lt 1 ]; then echo "no username provided"; exit 1; fi' ...
2
votes
1answer
34 views

What are the minimum privileges the owner needs on a file to still do a chmod on a file?

I have a file with 020 privileges on the file, and I can't delete it or perform a chmod on the file. Do you know what the minimum privileges the owner needs on a file to still do a chmod on a file? ...
2
votes
1answer
43 views

Setuid, SUID bit not providing root privileges

I've written and compiled a short program to allow any user to change the contents of my /sys/class/backlight/intel_backlight/brightness file, but I fail to escalate their permissions. What could I be ...
1
vote
1answer
125 views

reliable way to give all read/write access recursively in CentOS 7

What is the most reliable way to give all users read/write privileges for a given directory and all of its subdirectories and files in CentOS 7? In an eclipse web application project that uses ...
1
vote
1answer
78 views

Sticky bit and users with sudo permission

Let's say I chmod 1777 a folder /opt/test and all files inside it as user user1. Hence user2 is able to update and edit files inside the /opt/test directory. When user2 operates via sudo, he's able ...
1
vote
0answers
24 views

Centos 7 FTP Hidden Directory Issue

After setting up Centos 7 with a web server standard install and LAMP stack. I installed vsftpd. Everything works fine and configured it to accept passive to enable gui ftp programs. However, when ...
4
votes
3answers
77 views

mkdir permissions do not correspond to umask (change depending on location)

Whenever I create new directories in my home (or its subdirectories) they do not have write permission, even though umask is set correctly. Files I make DO have write permission. [mmanary@seqap33 ~]$ ...
0
votes
1answer
73 views

Accidentally removed execute permission from root directory.

I accidentally did chmod 770 / which removed all access to the system. I booted to rescue mode, dropped to root shell and tried to chmod 755 /, but I get message changing permissions of /: read-only ...
0
votes
1answer
44 views

enable to write to file inspite we remove all file permissions

something isn’t clearly for me when I remove all permissions from file as chmod 000 I expected to get permissions denied when I write to file but still I can write to file as the following example can ...
2
votes
2answers
35 views

Broke permissions on /bin, /boot, and /dev; how to clean the mess?

I just made a terrible mistake, I tried to fix it by myself but I need some help. Due to a syntax error all files and folders permissions were being changed: thankfully I saw this while it was ...
0
votes
0answers
90 views

DD-WRT: /tmp exec permission

After making a simple hello world OpenWrt package I installed it to the /tmp folder on the dd-wrt device. The program shows up in ls /tmp but when I try to execute it, it shows me /tmp/helloworld: ...
0
votes
1answer
49 views

Mess with permission files [duplicate]

i've written chmod 755 /etc/ and chmod 0644 /etc/ and now i find myself without access to anything,and inside the terminal where before there was username@system1: now there's I have no name!@system1: ...
2
votes
1answer
54 views

Why does chmod succeed on a file when the user does not have write permission on parent directory?

I am trying to understand file/dir permissions in Linux. A user can list the files in a directory using cd test ls -l Even if the user issuing above commands does not have read, write or execute ...
3
votes
2answers
106 views

Setting correct permissions automatically for certain file type when file is copied from non-Linux file system

The main reason I want this is my heavy use of dircolors, especially for ls --color=auto. For example, whenever a .mp3 file is copied from NTFS, it will have permissions set by umask 022 which ought ...
-6
votes
1answer
53 views

What does the -R switch mean when used with chmod or chown commands?

I'm just trying to get up to speed with permissions in Linux. I've come across an example which uses "-R" when changing permissions and ownership of a directory. What does the -R mean?
-1
votes
1answer
30 views

Can this be done in a one-liner? [duplicate]

Is there a way to do these two lines of code in one line? nc -l 17500 > listenToNetcat.txt chmod 754 listenToNetcat.txt
-2
votes
2answers
1k views

How to set the permission drwxr-xr-x to other folders?

I have few directores inside a folder like below - teckapp@machineA:/opt/keeper$ ls -ltrh total 8.0K drwxr-xr-x 10 teckapp cloudmgr 4.0K Feb 9 10:22 keeper-3.4.6 drwxr-xr-x 3 teckapp cloudmgr ...
19
votes
5answers
3k views

Understanding UNIX based permissions and their attributes

I've never really got how chmod worked up until today. I followed a tutorial that explained a big deal to me. For example, I've read that you've got three different permission groups: owner (u) ...
1
vote
1answer
54 views

File that is only readable with root privileges

I have a binary file that needs to run at startup on all accounts (including unprivileged user accounts), so a command to run it will be put into /etc/rc.local. The program itself will have only ...
2
votes
1answer
57 views

execute chmod on boot time on headless debian

I am programming a (web based) POS system, dedicated to be running on a debian based ITX-server with apache2 etc. Currently I am using Lubuntu 14.04 LTS for development (and for the 1st customer) with ...
2
votes
5answers
139 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 ...
1
vote
0answers
36 views

Capital S in file permissions [duplicate]

I issued the command sudo chmod 700 <directoryname> in the hopes of getting the permissions for that directory to look like drwx------ Instead, they look like drwx--S--- Why does this ...
2
votes
4answers
1k 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 ...
5
votes
5answers
570 views

What are the root permissions for a file?

If I type: ls -l file.txt I see that the rights for that file are equivalent to "456": 4 = owner (r--) 5 = group (r-x) 6 = others (rw-) Which the rights for root in this case? Does it have 777? ...
1
vote
1answer
109 views

Permission 0000 in /var/www/html through the sFTP

I can write in /var/www/html through the terminal in ssh, but to create a file by sftp through Filezilla, the file created have permissions 000. How do I fix this? My problem is with these ...
1
vote
1answer
68 views

How do I transfer files over ssh and also change their permission on the remote server without having to log in twice

guy@home~% scp file.* guy@server.server.com:/users/guy/public_html/kool-stuff/ Ok so this transfers some files. Then I usually have to login in another terminal and do this in order to make them ...
1
vote
1answer
44 views

Still able to read file after changing permissions

I've made a file as root, and written a string in it. Now I've changed mode to "0" like this: root# ls -al transit/ total 4.0K ---------- 1 root root 6 Jan 5 18:15 27050 root# If I try to tail, ...
0
votes
1answer
31 views

Multiple users' access to directory

I'm running Arch Linux. My website's files are in /home/user/www/ directory. Another users also have their website's files in /home/foo/www/ directories. Now if I want to change something on their ...
1
vote
1answer
287 views

Setting up permissions for common folder

I am trying to setup a little home network using Linux as the File Server and have run into a bit of problems w.r.t. to folder permissions that I can't seem to solve. The setup: An Ubuntu 14.04 ...
2
votes
1answer
92 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 ...
-1
votes
2answers
39 views

Adding setuid permissions to a file

I am hosting a php application on my CentOS 5 server. The application runs some commands via a ssh file called openmgr. For that I want to give a permission of -rwsr-xr-x to the file. I tried chmod ...
1
vote
1answer
68 views

Preventing user from accessing parent folders [duplicate]

I have a user who I only want to be able to access /var/www/ucp/ (his home directory). I have executed the following command on the / directory, the /var/ directory and the /var/www/ directory: chmod ...
2
votes
2answers
2k views

assigning read/write privileges for a folder to a user in CentOS 7

I am logged into a CentOS 7 server as root. I created a folder /somefolder. I want someusername to be able to write to that folder via scp from a remote computer. What command should I run so that ...
1
vote
0answers
129 views

tracking directory permission changes

Permission of a certain directory named 11203 got changed twice bcoz of which the hosted app encountered some problems. When i used the command.. ausearch -i |grep chmod |grep 11203 I got the ...
1
vote
1answer
110 views

How to give permission to group to read/edit unowned files on archlinux?

I'd like to be able to read files from external hdd or other partitions without having to su root every time or chmod the whole partition to myself/group. How can I give myself/group permission to ...
1
vote
1answer
151 views

How can a user be prevented from changing a file that has write permissions for other users?

An odd situation came up recently. User1 needed to be able to change files in a directory were the files and the directory were owned by User2 and in group User2. In order to facilitate this ...
1
vote
1answer
4k views

chmod: cannot access 'file' : No such file or directory error when the file exists

I downloaded and saved 2 files on Linux tails live os. I have set the appropriate permissions on those 2 files to allow them as executable. This is the command I used. sudo chmod 777 ...
0
votes
1answer
61 views

How do I search for every file with executable permission (+x) in my system? [duplicate]

I need to find every single file that has executable permissions in my system, i think they end with x@. I tried to ls every file and then grepping the output to match files with x@. Like this: ls ...
1
vote
3answers
170 views

chmod command to set a file as permission denied

I want my file not to be deleted by any user. Can I know the chmod mode command for the same? I need to get this kind of msg (rm ctl_model_fact.csv: Permission denied)
2
votes
2answers
270 views

print the /etc/shadow file in the console

How do I change the permissions of an executable file to access the /etc/shadow file? So far I have the following bash script: #!/bin/bash gcc print.c -o print chmod +s print ./print exit 0 and ...
0
votes
1answer
95 views

Executable directory? And chmod o+w changing the terminal directory color?

What does an executable directory mean? If o+w is set the directory changes colors to a background green, what does this mean? Why doesn't it do it for ug+w, but only for o+w? Additional question ...