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

learn more… | top users | synonyms

56
votes
9answers
47k 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 ...
25
votes
3answers
80k 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
4k 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
4answers
4k 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 ...
12
votes
5answers
913 views

Difference between +x and ./<script> and sh ./<script>

Are there any actual differences between running a script with [sudo] sh ./<script>.run instead of [sudo] chmod +x ./<script>.run [sudo] ./<script>.run
12
votes
3answers
11k 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 ...
12
votes
1answer
4k 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 ...
10
votes
3answers
20k 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 ...
9
votes
2answers
6k 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 ...
9
votes
1answer
9k 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?
9
votes
4answers
16k 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 ...
8
votes
3answers
15k 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
3answers
11k 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
3answers
25k 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 ...
6
votes
2answers
1k 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
195 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
1answer
573 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
3k 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
29k 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
6k 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
2k 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
9k 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
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 ...
4
votes
2answers
4k 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 ...
4
votes
1answer
8k views

File permissions won't change

sorry fresh user. I installed about 9 days ago and had issues with Unity disappearing which took 5 days of headaches to fix. It never did fix, I reinstalled. I set up Plex (media server) and while ...
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
302 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
1k 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
3answers
6k views

Not able to install *.run file in Ubuntu? [duplicate]

I am newbie with Ubuntu and I am using Ubuntu 12.04.3 LTS version inside Windows using WUBI. I have to install few softwares in Ubuntu which are as follow: MPLAB X IDE version 1.90 XC8 Compiler and ...
3
votes
4answers
6k 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
9k 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
4answers
239 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
1answer
132 views

Is there any way to make sure that any file created in a specific folder has a certain group as owner?

I know that you can set a directory up so specific groups have access to it, but is there any way to set it up so that any new files created in it automatically have a specific group as the group ...
3
votes
1answer
281 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
76k views

how to make chmod 777 all /var/www subfolders

im running webserver and ftp server, where my /var/www is binded on my /home/user/www i made both directory at chmod 777 (which is fine since its for testing only) i can upload files inside ...
3
votes
1answer
917 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
472 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
191 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
3k 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
7k 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
1k 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
144 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
41 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
5k 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
8k 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
2k 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
12k 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
700 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
132 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
2answers
2k views

Can't make a file executable

I'm using Ubuntu 12.04 64bit and I'm trying to make a file executable, but when I check the "Allow executing file as program", the check mark appears then disappear spontaneously. If it could help, my ...