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

CHMOD in FTP block - RESOLVED [on hold]

trying to change permissions on a file i'm FTPing to multiple servers. Using this in a shell script: ftp -n -v $TIP <<EOF | tee -a $FTPLOG user $TUSR $TPAS binary cd $TDIR/bin rename ...
1
vote
2answers
54 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
42 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
43 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
2answers
38 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 ...
0
votes
1answer
58 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
22 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
40 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
350 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
38 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 ...
0
votes
0answers
24 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
9k 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
63 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
56 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 ...
10
votes
3answers
5k 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
13 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 ...
2
votes
2answers
8k 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 ...
0
votes
1answer
3k views

What does “execute” permission on a folder means? [duplicate]

I have read this topic, which gave me some info but I feel I am not fully getting it. What does the execute permission actually means on a folder? I fully understand what it means on a file, but on a ...
0
votes
1answer
16 views

Help with permissions

I am trying to set up permissions but i dunno what excatly as a user. Could anyone tell me which permission will allow me to execute the touch and echo command in a directory ?
18
votes
7answers
12k 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
2answers
107 views

File Permissions Sticky&User Execution

After the website of a client has been hacked, I found some files with the following permissions set What exactly S and T stands for? Also, which one is the command to set them with those ...
1
vote
1answer
31 views

vsftp doesn't respect chmod setting when uploading outside my local network

Yo! I've a ftp server on my linux machine and I've set the following rules: I keep group and owner and chmod it to 775. When I use it at home (192.168.x.x) it's ok, files keep their group and user ...
1
vote
1answer
58 views

Linux Copy user's permission to another user

The server is centos, the user is named dev_admin. Now I added a new user ops_admin and I want to copy dev_admin's permission to ops_admin. I tried the following command as root: useradd ops_admin ...
-1
votes
1answer
36 views

Unix directory for all users permissions

I'm trying to make a directory where all users can write, but no user can delete another users file in that directory.
0
votes
1answer
43 views

How to convert text into numbers for chmod? [duplicate]

I need to chmod something into drwxrwx---. What is drwxrwx--- in number form?
2
votes
1answer
49 views

Is it a good idea to set file permissions to 640 on windows partition?

I run both Arch Linux and Windows 10 on my computer. When I cd onto the Windows partition (which uses NTFS), I notice that all files and folders have 777 file permissions. I want to run $ chmod 640 -R ...
0
votes
1answer
38 views

How do I modify contents of a directory without sudo?

I'm trying to modify the contents of a directory using git. Problem is if I use sudo it nullifies my ssh forwardAgent. I'm not the owner of the directory but I am part of it's group. If I chmod 775 ...
0
votes
1answer
30 views

Dandelion List Listener Fails

I am trying to use lisp in linux but I can not get the listener to work. Using Eclipse's menu, in help -> install new software, I installed the dandelion plugin but every time I try to run lisp code, ...
4
votes
1answer
2k views

Why does setuid not work? [duplicate]

I want to ensure that my program can only be run by user xyz using root privilege. To do this, I set the setuid bit with: chmod u+s program1.sh ls -l program1.sh rwsr-x--- 1 root house 1299 May 15 ...
4
votes
4answers
20k views

Change permissions for a symbolic link

I have a symlink with these permissions: lrwxrwxrwx 1 myuser myuser 38 Aug 18 00:36 npm -> ../lib/node_modules/npm/bin/npm-cli.js* The symlink is located in a .tar.gz archive. Now when I ...
26
votes
5answers
6k 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) ...
1
vote
2answers
87 views

Find all .php files inside directories with writable permissions

I'm looking for a linux command to scan through all writable directories on the server and show ones with .php and .html files inside them. Something like: find -type d -writable -exec find {} ...
0
votes
0answers
66 views

Prevent other users from reading my files

I have 2 users: Joe is root and Gary (normal user). But if Gary enters 'cat /home/joe/function.php', he can view all code with mysql password into this file. What is the solution for disabling all ...
0
votes
1answer
94 views

invalid mode chmod command

I am trying to look for all files with xyz in their filenames in my working directory and then change their permissions in symbolic mode. find . -type f -name *xyz* ; chmod -v u=a+wx {}\; I get ...
0
votes
0answers
71 views

Permissions set to 755 but I cannot access folder

I want to access some files in a folder that I created in a server. I have changed the file permissions recursively to 755, which basically should allow everyone to read and execute files, but this is ...
2
votes
1answer
95 views

chmod doesn't work on Mac

I have a very simple question. I cannot make a file executable from the command line on a Mac. This is what I'm typing in terminal cd ./Desktop echo 'say hello' > hello chmod +x hello hello It ...
6
votes
1answer
197 views

What permissions one needs to run chmod, chown command on a folder/item?

I've always been running chmod/chown commands as a sudo user. But today I wondered if I don't use sudo, what permissions do I need to actually execute chmod/chown command on a folder/file? I've tried ...
127
votes
9answers
16k 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 ...
2
votes
2answers
1k views

How to hide someone else's directories from a user?

I have several folders: /home/user1/ -u user1 -G user1 /home/user2/ -u user2 -G user2 /home/user3/ -u user3 -G user3 I created three users user1, user2, user3. Each user has their own group. Any ...
0
votes
1answer
79 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
60 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
114 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 ...
1
vote
2answers
45 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
1answer
166 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 ...
3
votes
4answers
14k 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 ...
2
votes
2answers
108 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
92 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
64 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 $ ...