chmod (short for change mode) is a Linux / Unix command used to change permissions of files and directories.

learn more… | top users | synonyms

0
votes
0answers
7 views

Rsync (-aR) Create a destination subdirectory with same permissions as top folder in source directory?

I'm using rsync to grab some modules within a web platform. I am able to pull things ok, the -aR relative flag works fine, and the structure is correctly replicated into a subfolder called ...
0
votes
0answers
26 views

File permissions not preserved on external hard drive

I have a brand new 3TB Western Digital "Elements" external (USB) hard drive. When I copy (cp, rsync) stuff across from my laptop file permissions are not preserved. In fact everything (files and ...
0
votes
0answers
13 views

Directory access not permitted

I recently installed the Open Virtual Desktop (Community Edition) on CentOS 6.6. I tried to open the folder created for a particular session. When the session was logged in, the folder could be ...
0
votes
1answer
34 views

Linux chmod: How to allow access to a folder and its subfolders/files

How can I do "chmod 704" to a folder which I want it to allow others to access and download the entire folder including its sub-folders and files? Thanks, Baha
0
votes
1answer
24 views

Prevent deletion of folder but let access to everything inside of it

I know there is the +i flag for files and directories, but i have a deeper Problem. Is there a way to prevent a folder from being deleted by an User which should be able to create / access / remove ...
0
votes
1answer
14 views

Why can't Ubuntu read external volume files after I recursively { chmod +r and remove ACL }?

The commands I used are: sudo chmod -RN /volume and sudo chmod -R +r /volume The external volume is a backup of OSX home folders. The above made it only possible to read what contents is in the ...
0
votes
4answers
34 views

On my Pi, chmod +w doesn't behave as usual?

$ ls -al file1 -r--r--r-- 1 pi pi 0 Feb 10 15:18 file1 $ chmod +w file1 $ ls -al file1 -rw-r--r-- 1 pi pi 0 Feb 10 15:18 file1 #only u is updated $ chmod +x file1 $ ls -al file1 -rwxr-xr-x 1 pi pi ...
1
vote
1answer
95 views

how to mount as read-write filesystem and not read-only

So, I'm trying to install gentoo in a virtual machine. I ran into this problem and began researching what the answer might be. The file system is read only. I can't mount it as read-write. I'd rather ...
4
votes
2answers
62 views

SUID bit on directories

In Linux there are SUID, SGID, and sticky bits for directory permission. So I am absolutely clear about the sticky and SGID bit on files or folders. What happens if I apply SUID bit on a directory? ...
0
votes
0answers
37 views

Killed server with chmod -R u+rwX,go+rX,go-w /

So I was trying to give files in /var/www/html/ 644 (rw-r--r--) permissions and killed the server: chmod -R u+rwX,go+rX,go-w / That changed permissions on all files it could on the entire server as ...
0
votes
0answers
51 views

(ftp client) uploaded file has wrong permissions

I've a ftp server on my linux machine, I've set rights rules to my server: 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 ...
0
votes
0answers
85 views

SFTP to multiple users access to same directory and take delete permission

I am trying to give permissions to multiple users to access var/www/my.com/folder2, which is owned by www-data. So simply I have a lot of sftp users and everyone only accessing to ...
0
votes
2answers
3k views

Can't connect Nextetender on Mac OS-X El-Captain

I just upgraded from Yosemite to El Captain but I can't connect Dell SonicWALL NetExtender version 7.5.757. I give this log message: [general error 463] ERROR: Pppd is not setuid-root and the ...
0
votes
0answers
106 views

Why does chmod g+s not work on my NFS mounts?

I've got some NFS mounts that have directories that I need chmod g+s set so that any files extracted inside of them retain the default GID. For some reason it won't let me change this on the NFS ...
0
votes
1answer
359 views

How to read ls -l permissions

I've been trying to understand Linux permissions. I know that I could download one file via CyberDuck from a remote Linux machine and the other one I was not able to. Here is the output of ls -l: ...
0
votes
2answers
99 views

Confirmation prompt for chmod, chown

I'm just trying to add a confirmation prompt to a few linux commands like chmod and chown. I've tried to google this but I can't find much information on the topic. While searching I found out ...
1
vote
1answer
22 views

chmod without modding other user perms

I want to chmod a file but I want to do it so it doesn't effect the other "user"/"groups" e.g. giving the root 0 before 741 chmod 0** [filename] after 041 or give the group a 7 before 741 chmod ...
0
votes
1answer
36 views

chmod 777 based on directory

I am wanting to perhaps create a cronjob that will monitor a directory and will do automatically chmod 777 and files that are created inside the directory or a subdirectory of my main directory. Is ...
4
votes
1answer
137 views

What does chmod 7760 <directory> do in CentOS 7 bash?

I typed the command chmod 7760 by accident. I meant to type chmod 770 and now I'm curious what the first command did exactly. After typing chmod 7760 , I typed ls -Al and the directory name was ...
0
votes
2answers
56 views

used chmod wrongly to mess up copy rights. How to correct

I ran a chmod command like chmod 644 dir/* It seems to have worked for files in this directory, but files in all other sub-directories are now in some limbo state. ls -l dir/sub-dir shows: ...
0
votes
1answer
70 views

Converting these chmod commands to cacls?

Perhaps someone could help me. I'd like to convert the following chmod commands to use on Windows 7 but my understanding is lacking. /bin/chmod -R u+w,go-w,a+r somedirectory /bin/chmod a+x ...
1
vote
0answers
37 views

Automatically chmod a+r on files copied into my (OSX FUSE / sshfs mounted) VFS

I have a virtual Linux machine running LAMP. On my MacBook I've mapped ~/remoteFS to this machine's ~/ using OSX FUSE & sshfs. i.e. First I install OSX FUSE. then I do: sshfs ...
0
votes
1answer
381 views

How to correctly set writable the /var/www/ directory of an Ubuntu Linux system?

I am a software developer so I am not so into operating system configuration details and I have the following problem. I have installed a LAMP environment of an Ubuntu Linux system dedicated to the ...
0
votes
0answers
66 views

World writable sudoers, no root password set

I have Kubuntu 14.04 installed on USB flash drive. Yesterday by accident I did chmod 777 /etc/sudoers. Now I can't set it back to 0440, because I get an error something along the lines of 'File is ...
8
votes
2answers
2k views

Vi can write to file despite file being read-only

The following example show how to create a file with only read permissions. As we can see, when I try to write to this file using the echo command I get, Permission denied. But why, in the case that ...
0
votes
0answers
254 views

DD-WRT: /tmp folder permissions

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: ...
1
vote
0answers
27 views

Making file's mode 000 on cygwin - does not work

Seems cygwin is unable to cancel a file readability mode, viz.: $ echo "123" > ttt $ cat ttt 123 $ ls -ls ttt 1 -rw-r--r-- 1 Administrator None 4 Mar 22 10:19 ttt $ chmod 000 ttt $ ls -ls ttt ...
1
vote
2answers
342 views

sudo chmod o+x but still can't run as regular user

I thought that doing sudo chmod a+x /root/file.to.execute or even sudo chmod 777 /root/file.to.execute should allow me—as a user—to run the program in question. But after doing this I still can’t run ...
0
votes
1answer
14 views

tree will not descend into directories

I just unpacked a tar file with a folder in it. I did a tree -F and saw asterisks popping everywhere. All of the files (even png, txt, etc) were marked as executable. So I did what any sensible human ...
0
votes
2answers
238 views

chown not working on ext4 hard drive

I have a new 3TB internal hard drive and after writing some data to it I completely zero'd the drive using DD. I then created a partition table (GPT) in Gparted and created an ext4 partition. All went ...
1
vote
1answer
1k views

chmod throws missing operand on 764, OK on 664

Having set everything in my project to 777 (rwxrwxrwx) for debugging purposes, I wanted to dial down the openness and set the directories (not the files) in the root folder to 664 (rw-rw-r--). To do ...
-1
votes
1answer
252 views

Can't run chmod on a bin file

I am trying to install the android NDK on OSX 10.10. Even though the file is there it keeps returning "No such file or directory" user$ ls acs git-media npm acs-debug ...
0
votes
1answer
40 views

Make my custom program root

I have a custom program in C, that iterates trough a directory and writes a log file with the contents in my home. However, it cannot acces /var/log/ /etc/ and other root folders. How to change that? ...
0
votes
1answer
112 views

change permissions for only one user in Apache-managed directory

Ok, this may look like it might be an Apache or an Owncloud question, but I think the way I want to try and solve the problem is a more generic one: On a Mythbuntu 14.04 server box, I have Apache ...
1
vote
0answers
59 views

Chmod doesn't work for all files

I'm trying to chmod my /var/www folder in Ubuntu, with the command: chmod -R 775 /var/www, and it works for the existing files. However, every time I add a new file, I have to run the command again, ...
2
votes
2answers
493 views

Error writing to USB mounted on Raspberry Pi

I have a Raspberry Pi which I recently bought, and am planning to use it as a torrent box. While setting it up (over SSH) I tried to mount a 8GB SanDisk USB Drive I had connected to it earlier. ...
2
votes
1answer
349 views

What does `chmod u+s directory` do?

chmod g+s directory makes new files inherit the group of the directory. I thought that chmod u+s directory would make them inherit the directory owner, but they don't and I see no other effect.
9
votes
1answer
508 views

Why will chmod 0000 directory-name not clear the special bits on the directory?

$ mkdir test $ chmod 0000 test $ ls -la | grep test | awk '{print $1}' d---------. $ chmod 6000 test $ ls -la | grep test | awk '{print $1}' d--S--S---. $ chmod 0000 test $ ls -la | grep test | awk ...
1
vote
0answers
113 views

Is there anyway you can restrict users from executing a command with another name?

I'm not asking an obvious question here. I would like to elucidate with an example. A user 'bob' is always executing 'chmod 777 /home/bob/impfiles' so that user 'alice' could make changes to the ...
0
votes
1answer
64 views

Shell Command that Combines chmod and chgrp

Is there a combined variant for chmod and chgrp that sets both user and groups permissions in one single system call for each file? This is useful for increasing performance on slow data layers such ...
0
votes
2answers
2k views

Change default permissions for new files and folders

Every time I create a new file or folder in Linux, it is accessible for r/w by myself, not the group. I want to change my system setting such that every new file or folder will be automatically ...
0
votes
1answer
2k views

Cannot change directory into home directory, although permissions are set correct

I guess I need some help from an advanced Unix user... On a Ubuntu System I did something stupid. I typed sudo chmod 774 .* or the like, in a subfolder of my home folder and then I suddenly could not ...
-3
votes
1answer
885 views

lost and important file for python 34

My AVG internet security deleted a file called: C:\Python34\pythonw.exe I now cannot access IDLE or even re-install python 3.4, although I can access the command line. How would you chown that file?
0
votes
1answer
67 views

How can I skip mounted directories with chmod?

chown supports a -x option to ignore file system mount points. Is there an equivalent for chmod?
0
votes
1answer
209 views

Is it possible to disable chmod/chown from sudoers for these specific directories /usr and /etc?

There has been two occasions where I have accidentally chmod-ized 777 the whole direcotry of /etc and it has forced me to come to the decision that I'd be better off to do fresh installation of OS ...
0
votes
1answer
610 views

I broke SSH by using chmod on an EC2 Instance — How do I correct?

I have been running an Amazon EC2 Instance for a while, and recently accidentally changed permissions/ownership on folders recursively. I can no longer SSH into the instance. I do not recall what the ...
0
votes
0answers
389 views

chgrp and chmod not working in cygwin (windows 8)

I work in "C:\Users\leyou.ssh" I need to chmod id_rsa to 600 as it's currently 644, but it has no effect. Hence I tried "chgrp Users id_rsa" but it doesn't work neither and the group remains as ...
1
vote
3answers
349 views

cygwin's chmod behaves as working, but it does not work

My Cygwin installation is behaving strangely: chmod does not work. [09:45 Administrator@DellIns14 ~] > ls -ls /usr/bin/chmod 64K -rwxr-xr-x 1 Administrator None 38K Feb 6 2012 /usr/bin/chmod ...
0
votes
1answer
55 views

Granting full rights on all files (owned by su) within certain directory

I got some trouble with a server situation, where i keep some configuration files in a sub-directory of a web project. Using my superuser account, i make changes to these files, which NetBeans commits ...
0
votes
1answer
347 views

How do I do undo chmod /usr/bin

For some reason I was messing around and did chmod -x /usr/bin/* (no idea what I was thinking) Is there a way to fix this, because at the moment nothing is executable