chmod changes the permissions of each given file according to mode, where mode describes the permissions to modify.

learn more… | top users | synonyms

48
votes
8answers
37k views

How do I use 'chmod' on an NTFS (or FAT32) partition?

I have a script that I need to execute on an NTFS partition. The script's permission is set to 600. I attempted to modify the permissions by running chmod 755 script.sh, which doesn't report a ...
19
votes
3answers
62k views

'chmod u+x' versus 'chmod +x'

What is the difference between chmod u+x and just chmod +x? I have seen a ton of tutorials that say to use u+x to make scripts executable. However, the u is not mentioned in the chmod help or ...
15
votes
2answers
3k views

Why don't I have a password for “su”? Problems with “sudo”

I have installed Ubuntu using the GUI, giving myself a password and everything. I do not intricately remember the process. However, what worries me is that I don't know the following password: $ su ...
12
votes
1answer
3k views

Files are read-only after copying over samba

I used to copy files from one system to another system via samba. How ever I am getting the file only in read only mode. What i am doing now is i used to change the file permission after transferring ...
11
votes
3answers
6k views

Copy files without losing file/folder permissions

How can I copy files/folders from an ubuntu computer on a ext4 filesystem to another ubuntu computer which also is on an ext4 filesystem, using a usb stick which uses a vfat filesystem without losing ...
10
votes
4answers
3k views

What if I accidently run command “chmod - R” on system directories (/, /etc, …)

I accidently ran sudo chmod 755 -R / instead of sudo chmod 755 -R ./ I stopped it after few seconds, but now there is some problems such as sudo: must be setuid root How can I revert ...
10
votes
3answers
14k views

Changing permissions on serial port

I'm using the Arduino IDE in Ubuntu, and am having issues with the serial port. It has worked in the past, but for reasons that may be unnecesary, I felt the need to change the ownership of some of ...
8
votes
2answers
5k views

chmod files only in all subdirectories

Please someone assist me with chmod, I have the following file structure -dir1 --file1 --file2 --dir1a ---file1a1 ---file1a2 --dir1b ---file1b1 ---file1b2 How do I chmod 655 to all files under dir1 ...
8
votes
2answers
14k views

Error after sudo-ing “sudo: must be setuid root”

On a colleagues computer, everytime I use a sudo command, I get this error: sudo: must be setuid root I tried various things mentioned on the internet, like changing the permissions to 4755 from a ...
8
votes
4answers
13k views

Permission denied on ~ even though owner listed as me

Somehow, I managed to chmod and chown my ~ into oblivion. When I attempt to login through the shell, I get bash: ~/.bashrc : Permission denied Even after (as root) I've run chown -hR nroach44 ...
7
votes
1answer
6k views

How to get chmod (octal) permissions of the folder in the terminal?

I can look in properties of this folder but I want to get properties fast and in digits (octal, e.g. 755, etc.) What am I to type in terminal to know the chmod of the file or folder I want?
7
votes
3answers
9k views

How to fix sudo after “chmod -R 777 /usr/bin”?

I enetered chmod -R 777 /usr/bin and now sudo is not working. It is giving error that sudo must be setuid root. On looking via Google, some advice said to run chown root:root /usr/bin/sudo chmod ...
6
votes
2answers
824 views

How can I recover from chmod -R a-wrx / command?

Today I ran sudo chmod -R a-wrx /. Now nothing is working. Can anyone help me recover my system?
6
votes
1answer
182 views

Chmodded 000 the home folder,now unable to log in

I accidentally issued the following command sudo chmod 000 /home/username/. And now I'm unable to log in. Also when I'm trying from the bash shell, my home folder is appearing as ...
5
votes
3answers
23k views

Default file permissions for php user www-data

I have a php installed on my ubuntu machine. The web root is /var/www I set the permissions for this folder like so: sudo chown -R ftpuser:www-data /var/www ftpuser is the user I set up so I ...
5
votes
1answer
432 views

How to change default file/folder permission of specific user?

How can I make any folders or files created by a certain user always be public (accessible by anyone) in Ubuntu?
4
votes
3answers
2k views

problem with chmod command

I don't know what is happening experimentx@workmateX:/var/www$ sudo chmod 0777 -r /var/www/ chmod: cannot access `0777': No such file or directory experimentx@workmateX:/var/www$
4
votes
2answers
26k views

How can I change permissions of a folder, including its enclosed files and subdirectories?

I need to recursively change the permissions of all folders, sub-folders and files from within ~/.local/share/Trash/expunged Does anyone have a clue or idea on how to do this? I have tried ...
4
votes
3answers
4k views

What are the default file permissions for the home folder?

I have somehow inadvertently altered the file permissions of my home directory. I wish to change them back to the default permissions. However, I can´t seem to find out what the default is. ...
4
votes
3answers
997 views

Is `chmod -R o+x /home` dangerous? [duplicate]

I'm very new to Ubuntu. During work on my home pc, I accidentally made the following command: sudo chmod -R o+x /home I want to know if it's dangerous to open access for other users and, if so, how ...
4
votes
2answers
8k views

chmod: invalid mode: `+a'

System: ( lsb_release -a ) Distributor ID: Ubuntu Description: Ubuntu 10.04.4 LTS Release: 10.04 Codename: lucid This is my command: sudo chmod +a "www-data allow ...
4
votes
2answers
5k views

Default filesystem permissions and access rights in 12.04?

I have for many years on Unix and Linux systems as default set filsystem permissions and access rights to read and write for user (i.e. myself), and only read permissions for group and others. In the ...
4
votes
1answer
283 views

Assigning different directory permission for each different groups

I am running Ubuntu 12.04 64bit server on ext4. There are four user groups - marketing, sales, admin and etc. I need to assign different permissions to /archive as follows: rw for the marketing ...
3
votes
3answers
777 views

How do I import a disk image into libvirt?

Can someone post the proper syntax? I have tried using the chmod command , but I am doing something incorrectly. I am just trying to move a centos iso file to /images to set up a test vm
3
votes
4answers
5k views

Permissions for apache webroot folder on dev server?

I am a web developer and have Apache setup on my local system for testing. I keep running into issues with the permissions e.g. unless I chmod any new directories to 777 my IDE cannot write to the ...
3
votes
1answer
3k views

local wordpress installation, plugin installation and file permissions

I have a local wordpress installation and got everything working, until I tried to install a new plugin. Trying to activate the plugin, wordpress asked me for FTP connection information, which I ...
3
votes
4answers
197 views

What is “chmod” and its practical aspects?

I am new to Ubuntu and I used to do everything on Windows. As much as I know Windows has "read only" file option for the user. However, in my opinion, Ubuntu allow the user to manipulate file ...
3
votes
2answers
2k views

Why doesn't chmod work on a file under /media?

I want to execute a script file from terminal but it shows error root@silambarasan-PC:/media/D-DEVELOPME/androidSdk/adt-bundle-linux-x86/sdk/tools# ./android -bash: ./android: Permission denied` so ...
3
votes
1answer
232 views

files disappeared after using chmod

I set my /var/www/wordpress folder to 744 permissions and all of the files within disappeared. If I right click the /wordpress folder and click properties, it says there are 0 bytes in the folder but ...
3
votes
1answer
4k views

How can i check the folder permissions in ubuntu server 12.04?

Right now, I know that I can change persmissions for example with : sudo chmod 550 directory I wonder how I can check the actual folder permission.
3
votes
1answer
813 views

can't chmod on external hard disk? [duplicate]

Possible Duplicate: How to change files permissions from a different hard drive? I have an USB3.0 external hard disk, partitioned to 3 NTFS partitions. When I plug the hard disk in, the 3 ...
3
votes
1answer
323 views

Add Group Permission to Run chmod Command on Group Owned Files

I've been searching for about an hour now and all google ever returns are hits for how to use chmod. I want to be able to grant users that are part of a unix group permission to run chmod on files ...
3
votes
1answer
175 views

Directory permission

I am running 12.04 x64 server on ext4 disk. There are two user groups 'A' and 'B'. For a specific directory, I would like to give its all permissions to user group 'A'. Also I would like to give only ...
3
votes
2answers
2k views

What are the standard file permissions for the /etc directory(file)

I kinda screwed up the /etc directory by running: sudo chmod 417 /etc Leaving me unable to use sudo: sudo: can't open /etc/sudoers: permission denied. sudo: no valid sudoers sources foundm ...
3
votes
3answers
5k views

Cannot write to Folder mounted with SSHFS

I just created a folder according to SSHFS (Ubuntu Docs) sudo apt-get install sshfs sudo gpasswd -a jm fuse sshfs -o idmap=user jm@example.com:/path/to/folder folder Then I found that the folder is ...
3
votes
2answers
610 views

How to make all new files in a directory executable

I want a way by which whenever I create a new file in a particular directory, I want it to be executable by default. Is this even possible, if so how?
3
votes
2answers
141 views

changed the permission of bin to 700

I changed (through chmod) the permission of /bin to 770. Now, ubuntu does not boot. How do I fix this problem?
3
votes
0answers
40 views

chmod: permissions of a directory don't change [duplicate]

I have some issue with chmod: mis@hell:/var/www/blah$ sudo chmod g+w .git -v mode of `.git' changed from 0755 (rwxr-xr-x) to 0775 (rwxrwxr-x) mis@hell:/var/www/blah$ ls -la | grep git$ ...
2
votes
2answers
4k views

File permissions: why can't I list a directory?

I am able to list directories in a root shell, root@ThinkPad:~# ll /media/ total 36 drwxr--r-- 6 root root 4096 2011-05-12 16:41 ./ drwxr-xr-x 22 root root 4096 2011-05-12 13:14 ../ drwxr-xr-x 5 ...
2
votes
2answers
6k views

How to repair “sudo: /etc/sudoers is mode 0640, should be 0440?”

Why might sudo chmod -R a+w * cause sudo: /etc/sudoers is mode 0640, should be 0440 sudo: no valid sudoers sources found, quitting and how might it be made to work?
2
votes
4answers
1k views

Changing file permissions problem

A few hours earlier I bought a beaglebone and now I am trying to add nameserver 8.8.8.8 (google DNS) to /etc/resolv.conf. However when I open it with vim and try to add my nameserver, it gives me E21: ...
2
votes
2answers
11k views

Setting directory file permissions in Ubuntu using chmod

whats the equivalent command of this (Fedora command) for Ubuntu: chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs When I try the above with Ubuntu ...
2
votes
1answer
652 views

How to use `chown` and `chmod` to make a “pipe” or “pass through” link from guest directory to elsewhere

I want to either extend the size of my guest partition or figure out how to copy stuff from the guest partition to my normal /home directory. (Because of some other problems I can only run Xorg as ...
2
votes
1answer
126 views

Only 8 days into Ubuntu, and I did some damage

In order to eliminate some of the permissions obstacles I keep finding, I decided to make it easier on myself. I did $ sudo chmod 755 -R /usr If I knew 10 hours ago what I've learned in researching ...
2
votes
1answer
628 views

Are there consequences to running 'sudo chmod u+s /sbin/shutdown'

I want to do this so that gShutdown application can shutdown the system when I'm not there to enter a password. But I've read on forums that changing linux commands with chmod can cause problems in ...
2
votes
1answer
52 views

Permissions issue [duplicate]

Which would be the right chmod value for a directory where everyone can write on it, but only the owner of the content can delete it? I thought chmod 1755 path_to_directory would be the right one, ...
2
votes
2answers
3k views

chmod u+s in /var/www

i have a problem at granting the right rights for the right user... i want to run pootle with apache, so i downloaded pootle. Then i copied it to /var/www, installed it and gave the www-data user ...
2
votes
1answer
415 views

Are world-writable folders safe?

Is it safe to chmod a directory 777, or is it a security risk? One of my scripts requires that in order to run in multi-user situations, and I'm wondering if it's okay.
2
votes
1answer
560 views

How do I change the default permissions of home directories created with adduser?

How can I change the default chmod of new home directories (created with adduser)?
2
votes
1answer
507 views

My newly added user cannot write to folder

Suppose I installed ubuntu with the user usr1 then I added usr2. I then create a group grp1 where this 2 users are added. A folder is owned by usr1 and has group grp1. But when I login as usr2 I ...