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

learn more… | top users | synonyms

2
votes
3answers
1k views

Deleting a chmod 0 file without superuser rights?

A PHP script accidentially changed the right flags (chmod) of a directory to 0. (No access to anybody, including owner). If I have no root access to this server, is it possible to delete the file ...
2
votes
1answer
1k views

Making a program always run as root in OS X

I'm trying to make a C program run always as root, no matter who is calling it. Basically, I want it to invoke "mkdir /test" as an example. So I created the C program as follows: #include ...
2
votes
3answers
297 views

Does permission 777 allow scripts outside your server to write on it?

Let's say example1.com is located in US, and example2.com is located in EU. example1.com/folder/ has 777 permission. Will a script in example2.com be able to write on example1.com/folder/? Or is ...
2
votes
1answer
253 views

Weird chmod parameter - “!$”

I found on an article a line that was saying: Now execute -> sudo chmod 700 !$ What does !$ in that case?
2
votes
1answer
190 views

Always create files/folders but only write to those the user owns

I need 2 Linux users to share a folder. Within this folder, users should always be able to create files and sub-folders and write into any sub-folder (whether they own it or not). However, they should ...
2
votes
3answers
585 views

In GNU/Linux, how to restrict deletion of files and directories owned by a user to a super user only?

In GNU/Linux, how can directories be set such that the owner can only add/read files/directories to/from them but only a super user can do any deletion in that structure? Consider this scenario: You ...
2
votes
1answer
110 views

UNIX: Just been hacked.. any steps to securing files and directories?

I used command to delete all files modified within last day. But is there a command that can go through all PHP files and all directories and modify them back to standard permissions that's safe for ...
2
votes
2answers
610 views

linux permissions on folders

AFAIK when i have r-- it means i can read the directory but not CD into it (according to the book). IIRC i can drop files in when i have -w- access. So why cant i copy files (i understand why i cant ...
2
votes
2answers
2k views

Restore default permissions to “/var” to CentOS installation

So I accidentally ran chmod -R 0777 /var and I need to revert that (let alone allow chmod the correct ssh directory so I can log back into it). I'm feeling screwed, can anyone help? The sooner the ...
2
votes
1answer
381 views

How can I mirror a Linux directory and back up all metadata?

I need to backup my home folder (and a few other folders) on an organizational Linux NFS system where my account will be expiring soon, onto a personal hard drive (which is not using a Linux ...
2
votes
1answer
4k views

User Permissions: Daemon and User

I often run into this issue on Linux, and I'd love to know the proper way of solving it. Say I have a daemon running. In my example, I'll use LigHTTPD, a webserver. Some software, like Wordpress, ...
2
votes
2answers
37 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
4answers
3k views

File still unwriteable in /var/www/html after the chmod command

I've got some trouble while trying to install some applications on my linux system. It is said that the files in my /var/www/html/xxx directory, where I put them, is not writeable. The command chmod ...
2
votes
0answers
195 views

OSX how to chmod a mounted AFP folder from NAS

I have mounted a drive from my DLINK DNS 320 Nas onto my Mac Mini 10.9 via AFP. One of the subfolders where I usually store photos (named '2013') is currently showing restricted access permissions, ...
2
votes
1answer
104 views

How to delete file with no write permissions for any user?

I find myself in a strange situation where a script wrote files with the following permissions: -r-------- 1 user1 user1 file1 Dec 24 14:53 -r-------- 1 user1 user1 file2 Dec 24 14:54 -r-------- 1 ...
2
votes
0answers
141 views

Debian broken filesystem by chmod -R 0774 /

An user made the chmod -R 0774 / command. When i execute the su command i get: "it was not possible to define groups". If i try to ssh from the root i get: /bin/bash permission denied the ...
2
votes
1answer
271 views

Unable to create files in a directory

I have created a directory in Virutalbox. Using VBoxManage, I am executing a script inside the Ubuntu VM directory I created above from Ubuntu host OS. But if the script in the VM contains commands ...
2
votes
1answer
623 views

What is the equivalent of umask in Finder?

It is not entirely a problem with Finder. It happens system-wise. Whenever I create a file in osx, the permission is always set to owner read/write and the rest read only -rw-r--r-- 1 me mygroup ...
2
votes
0answers
141 views

Windows equivalent of the Linux command “chmod”? [duplicate]

Possible Duplicate: Program to change file permissions in windows What can I use to set/change permissions on a Windows folder than not the Windows-based solution? There is an equivalent ...
2
votes
0answers
462 views

Cannot change permissions in symlinked dropbox directory in Ubuntu 10.10

Title pretty much says it all, but here's what I'm doing... ls -l produces this... drwx------ 1 brian brian 4096 2010-12-28 14:19 foldername -rw------- 1 brian brian 0 2010-12-28 15:54 index.html ...
2
votes
3answers
224 views

Linux directory access question

I have a linux system with apache installed and i store web files in /home/username/www/sitename/htdocs. For this to work my /home/username has read and execute permissions for everyone. I know it's ...
1
vote
4answers
451 views

Question on chmod in UNIX

What does chmod 654 stand for ?
1
vote
4answers
124 views

Is there any harm in converting all files to executable?

I wanted to install certain software. The package had lots of files including some shell scripting files. Initially I had to select some files and then make it executable: chmod 777 shellscr1 but ...
1
vote
2answers
871 views

description for command : chmod 777

I encountered an option for chmod: chmod 777 /tyr/.... What is 777 for?
1
vote
1answer
23k views

Setting chmod 777 on folder using Mac Terminal

I am trying to set the upload permissions on a local folder in my test website. I'm using Terminal on a Mac and the following command: chmod 777 thumbs but I get the following error chmod: thumbs: ...
1
vote
3answers
3k views

Can I use `chmod` to change the permission from -rwsr-xr-x to -rwsr-sr-x?

Can I use chmod to change the permission from -rwsr-xr-x to -rwsr-sr-x?
1
vote
3answers
2k views

whats the difference between chmod 777 and chmod 7777

I have a professor who insists on always typing chmod 7777, but I was taught that chmod 777 was the proper convention. I tried them out on the command line and chmod 777 something.txt yeilds ...
1
vote
1answer
67 views

Are rights 7110 equivalent to --S--S--s?

Are rights 7110 equivalent to --S--S--s? I mean the rights for Unix' chmod command.
1
vote
6answers
155 views

Give execution permission to directories but not to files

I have a directory structure with files and directories and I like to assign permissions so all the files and directories have read-write permissions for the user and read permissions for the group ...
1
vote
2answers
1k views

How to chmod +x a file in Windows, for use in Linux?

I have a file that needs to be executable in Linux, which I'd do by using chmod +x when using Linux. My problem is: this file is compiled in Windows, and it's a pain to have to open my Ubuntu VM to ...
1
vote
1answer
648 views

chmod: I own the folders, but I can only delete the folder, not the files inside it

Hello I new to linux and i have searched about 10 hours for a answer without success. I have created a folder called "Datatank" and chmod 777 Datatank All files and folder inside Datatank can I ...
1
vote
1answer
2k views

chmod 777 no effects on Linux Mint

I'm trying to assign run privileges to a file named foobar using: sudo chmod 777 foobar However nothing happens. The file is located on a NTFS mounted partition. The mount command says: /dev/sda4 ...
1
vote
3answers
1k views

Parameters to be used with chmod?

How to use CHMOD in linux? When I try to delete a file/folder, permission is denied. What exact params must I give for chmod here? This is what I need to do. Execute a command ./build.mips , but I ...
1
vote
1answer
79 views

Disabling chmod for some users

In Linux system, assume that there is user 'A' (non-root user who has ssh login permission). 'A' owns an executable file "A.out". I want to allow 'A' to read/execute "A.out" However, I don't want ...
1
vote
1answer
77 views

Why does 'cd' not work on an entry with 'directory' attribute?

My OS is fedora 20. I act as a root user. under / directory, I input: #ll ... d????????? ? ? ? ? mnt ... #cd mnt bash: cd: mnt: Not a directory #chmod 777 mnt chmod: cannot access 'mnt': No such ...
1
vote
2answers
1k views

What does the command “chmod a=w g+x alpha” do?

I was asked this question but didn't know what it does. I know chmod and its usages but what does this exactly do ?
1
vote
2answers
330 views

chmod 700 -R ~ - is it safe?

I'm thinking of doing 'chmod 700 -R ~'. Can it be dangerous? What can happen what I don't expect? Also, is there any way to keep all files on $HOME to be -rwx------?
1
vote
1answer
98 views

Changing chmod flags back

I'm fairly new to the whole UNIX / command shell sort of stuff, so I apologize for any ignorance for something I am not aware of. And by new, I mean extremely new. I was confused by how to change a ...
1
vote
2answers
161 views

Convert ls -ld to chmod/chown commands

X home dir permissions: drwxr-xr-x Y home dir permissions: drwxr-x--x So my question is, how can i convert drwxr-x--x to a chmod/chown command so I can put the same permissions that Y has on his home ...
1
vote
2answers
94 views

Changing permissions for specific folder

i need some help. I'm using Fedora 15. I have 2 users: user1 and user2 and directory in /usr/local/example_directory. Now for this directory owner is user1 and other users can only read this. I need ...
1
vote
2answers
230 views

find files where group permissions equal user permissions

Is it possible to do something like find -perm g=u? I say "like" because -perm mode requires mode to specify all the bits, not just g, and because I can't put u on the right side of the =, like I can ...
1
vote
1answer
400 views

Accidentally removed read permissions from folder. How do I get back in?

I wished to have a given folder and file and all descendants, write permissions. I wished that ALL files and folders could be recursively granted he following permissions: 777 So I tried: chmod -r ...
1
vote
1answer
204 views

Search for chmod 777 in terminal

I'm working with a system where a few files and maps seem to have permission 777. I want to change them to a more secure chmod, but I don't have a list of all the 777-files. I could do a terminal ...
1
vote
1answer
171 views

CHMOD Folder and Files recursively but with different values

Is there a way to recursively change the access rights of a specific folder to 755 and files to 644 Without using the find function and having sub-directories in that folder (don't want to change ...
1
vote
4answers
1k views

How do I find and modify permissions on one filetype in an Ubuntu terminal? [duplicate]

Possible Duplicate: How to chmod 755 all directories but no file (recursively) ? I've just upgraded from Ubuntu 8.04 to 9.04, added an extra hdd for /home and used an iPod (FAT32, sadly) to ...
1
vote
1answer
30 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.
1
vote
1answer
28 views

list out owned file/directories and change its permissions

Can anyone please tell how can I change files/directories owned by me only. below is the command that list out files/directories owned by me find . -user <username>
1
vote
2answers
241 views

Restrict user access to only read from /proc

As a method for setting up some bare-bones systems monitoring, I have a script set up to SSH in, and run some basic shell commands, reading some files in /proc. I would like to create a specific user ...
1
vote
1answer
1k views

Automatically chmod a file when doing git add?

I have an ubuntu development system using git to manage files, but I like to do my editing in QTCreator on a different (windows) system, so I have a windows network drive mapped to the ubuntu server. ...
1
vote
2answers
2k views

sftp chmod recursive

I have logged into a server via sftp via terminal. When I run the command chmod -R 755 ./* I get the error You must supply a numeric argument to the chmod command.. How do I apply a recursive ...