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
16 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 ...
3
votes
1answer
176 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 ...
1
vote
3answers
30 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
23 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
32 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? ...
0
votes
3answers
634 views

Directory appears as file?

So we copied some photos in a directory across to a NTFS partition last night, and they were viewable from ubuntu. Today the directory is not accessible from Windows, and when we booted back into ...
2
votes
1answer
32 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 ...
6
votes
3answers
53k views

Create file in folder: permission denied

I'm a newbie in the GNU/Linux-Ubuntu world. I have a problem copying files to a directory on Ubuntu 12.04. I create a directory in the home directory so that the path where I want to copy to is: ...
1
vote
1answer
70 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
63 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 ...
2
votes
2answers
31 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 ...
4
votes
3answers
67 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 ~]$ ...
1
vote
0answers
19 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 ...
0
votes
1answer
49 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
41 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 ...
0
votes
0answers
61 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: ...
16
votes
4answers
7k 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
42 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: ...
4
votes
2answers
2k 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 ...
2
votes
1answer
46 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 ...
0
votes
4answers
146 views

Applying different permissions to files vs. directories

Sunny answered the question above in this post, The answer was given as No need for scripts. // Directories: find . -type d -exec chmod XXX {} \; // Files: find . -type f -exec chmod ...
19
votes
5answers
3k views

Understanding UNIX 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) ...
3
votes
2answers
88 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
8answers
8k views

Convert ls -l output format to chmod format

Say I have the following output from ls -l: drwxr-xr-x 2 root root 4096 Apr 7 17:21 foo How can I automatically convert this to the format used by chmod? For example: $ echo drwxr-xr-x | ...
-6
votes
1answer
45 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
29 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
402 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 ...
5
votes
5answers
524 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
48 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
5answers
127 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 ...
2
votes
1answer
49 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 ...
1
vote
0answers
35 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 ...
1
vote
4answers
487 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 ...
114
votes
8answers
10k 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
90 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
45 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
42 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
21 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
229 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
81 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
38 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
61 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
934 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
81 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
3answers
8k views

Giving PHP permission to write to files and folders

UPDATED FOR FURTHER CLARITY: According to http://expressionengine.com/user_guide/installation/installation.html, it says: For most Unix hosts the following is typical, but you may check with your ...
1
vote
1answer
102 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 ...
15
votes
6answers
9k views

Is there a web based converter between rwx and the octal version?

I can never remember what the conversion is from something like rw-r--r-- to 644. Is there a simple web based converter between the 2?
1
vote
1answer
138 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 ...
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
1answer
3k 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 ...