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

ACL contradict chmod

I have installed opencart 1.5.6.1 on Digital ocean ubuntu14.04 I have used "demo" as username and login by tightvnc opencart requird "www-data" as owner and group: $ sudo chown -R www-data:www-data ...
2
votes
1answer
29 views

What is the meaning of the mode mask names from stat(2) and chmod(2)?

The stat calls have a series of symbolic names for the various bits in the mode field. From the stat(2) manual page: The following mask values are defined for the file mode component of the st_mode ...
0
votes
2answers
70 views

chmod – execute permission for non-admins?

I have used chmod to make all the contents of a directory executable. However, when I try to run one of the programs in that directory as a regular user (me), I get a "command not found" message. If ...
2
votes
1answer
48 views

Give permissions to change permissions

I am running a script to deploy a website on a server. It gives me the following error: DEBUG [4223cc8a] Command: /usr/bin/env chmod +x /tmp/mysite_staging/git-ssh.sh DEBUG [4223cc8a] changing ...
0
votes
0answers
21 views

Prevent other user read my files

Hello i have 2 users Joe is root and Gary (normal user) but if gary enter 'cat /home/joe/function.php' gary can view all code with mysql password into this file. What is the solution for disable all ...
1
vote
2answers
27 views

shell script for chmod file name but only on new files since last run of the script

i have a directory where new files are uploaded and receive numeric filename as they are uploaded. the file name is numbers that go up. i need to change permissions for the file but only on new files ...
2
votes
2answers
70 views

Is it possible to change the directory permission to its previous state?

I have accidentally changed the permission of "/usr/bin" directory and its files by the command: $chmod 775 /usr/bin -R First, there was a problem with sudo but I fixed it. Now I am suspicious that ...
0
votes
1answer
39 views

Always get Error: Operation not supported for: find /Path/ -type f -exec chmod 755 {} \;

I want to change the access permissions for MP3 files on an external 2,5" HDD on my Raspberry Pi on which I run an actual version of Raspian. To do so I tried to use the following command: find ...
1
vote
1answer
35 views

changing file premissions doesn't work

I ssh into a server, and tried changing a files permission. This is what I got: $ ll total 1 -rwx--x--x 1 <user> <groups> 17 Jul 29 12:06 index.html $ chmod 777 index.html $ echo $? 0 $ ...
-1
votes
2answers
31 views

How to make an existing directory (and sub-directories) to be suddenly writable by ROOT ONLY?

Let's say i have a directory, at: /tmp/uploads/ And inside got several recursive directories and files created by DIFFERENT USERS before. So now, suddenly how do i make that above directory to be ...
-2
votes
1answer
50 views

How to make a NON-WRITABLE directory?

Actually i'm aware of a "PHP Web Folder". There seems to be some potentials of incoming attacks. So that i want to make sure this whole directory is READ-ONLY (Only writable by ROOT). Let's say the ...
1
vote
2answers
63 views

How to Change Owner of a Directory

EDIT: The problem was that Apple uses permissions to mark backups and prevents you from modifying them (probably a security feature). By using chmod -RN <dir> I removed ACL data from all the ...
15
votes
3answers
1k views

Purpose of permissions such as 0111 or 0333

What is the purpose of Linux permissions such as 111 or 333 (i.e. the user can execute, but cannot read the file), if the ability to execute does not automatically imply the ability to read?
0
votes
1answer
109 views

Meaning of chmod 1775

Created a folder "Sample_dir" and analysed its permissions. $ mkdir Sample_dir $ ll Sample_dir/ total 36 drwxrwxr-x 2 user user 4096 Jul 1 19:26 ./ drwx------ 71 user user 28672 Jul 1 19:26 ../ ...
1
vote
2answers
55 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
68 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
46 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
150 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
145 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
34 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 ...
6
votes
3answers
461 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
33 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
116 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
43 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
41 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
61 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
328 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
113 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
26 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
108 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
123 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
47 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
39 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
122 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
73 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
80 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
152 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 ...
-8
votes
1answer
71 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
32 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
4k 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 ...
20
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
59 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
77 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
154 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
4k 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
675 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
148 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
101 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
45 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, ...