Questions tagged [permissions]
Short for "file system permissions" - access control based on user, group, or global access.
7,626
questions
769
votes
9
answers
3.8m
views
Change folder permissions and ownership
I would like the user to have full rights on this folder (as well as all sub-directories and files in it):
~/.blabla
currently owned by root.
I have found numerous posts (in this forum and ...
513
votes
7
answers
522k
views
How can I get octal file permissions from command line?
There is a chmod command to set file permissions, but can I get file permissions in octal mode (such as 755) from the command line?
479
votes
8
answers
1.4m
views
How do I change my username?
Some time ago, when I installed Ubuntu, I chose a rather stupid username for my account that I do not want to use anymore.
How do I change this (including the name of my home directory, and the name ...
329
votes
5
answers
1.5m
views
Give specific user permission to write to a folder using +w notation
I know I can assign the permission to write to an owner/group/others like this:
chmod u+w myfolder
Can I specify the specific user here? Some like this:
chmod username u+w myfolder
298
votes
3
answers
933k
views
How to extract a zip file to a specific folder?
I have a zip file that I need to extract into another folder. When I set up extraction to said folder it says "permission denied". I've read here how to log into a terminal as root and superuser but ...
294
votes
22
answers
2.0m
views
SSH Permission denied (publickey)
I am trying to connect to a Linode (running Ubuntu 12.04 LTS) from my local machine (also running Ubuntu 12.04 LTS)
I have created a private and public key on my local machine and copied my public ...
278
votes
11
answers
399k
views
can't login as mysql user root from normal user account in ubuntu 16.04
I just installed Ubuntu 16.04 LTS along with the packages php, mariadb and nginx. I ran mysql_secure_installation and changed the root password.
Now when I try to login to mysql using the root ...
244
votes
7
answers
501k
views
What is "umask" and how does it work?
I believe that umask is something that controls file permissions, but do not fully understand it.
After running umask 0644 in a terminal, I cannot read the files I create with the command-line text ...
235
votes
5
answers
1.0m
views
How to find owner and group of a directory?
How can I find out owner and group of a directory in Ubuntu?
231
votes
5
answers
338k
views
Why doesn't `sudo cd /var/named` work? [duplicate]
I want to cd into /var/named but it gives me a permission denied error, and when I want to use sudo to do this I am not permitted. What is the technical reason for this, and is it possible to do this ...
175
votes
6
answers
307k
views
What does this apt error message ("Download is performed unsandboxed as root...") mean?
I get it after updating in Synaptic Manager
I recently did a clean install of Ubuntu 17.04 from 16.10.
error message:-
W: Download is performed unsandboxed as root as file '/var/cache/apt/archives/...
173
votes
4
answers
884k
views
How do I grant sudo privileges to an existing user? [duplicate]
I want to grant a newly created user sudo privileges in Ubuntu.
I tried
sudo adduser hduser admin
but it says no admin group exists.
How can I do it?
170
votes
5
answers
568k
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, omitting the u doesn't seem to have any effect.
166
votes
8
answers
333k
views
Whats the simplest way to edit and add files to "/var/www"?
Having installed the web server is there a simple way to set a user able to use the graphic interface to copy files and directories to the local web server /var/www
I gave myself administrative ...
165
votes
10
answers
317k
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 ...
151
votes
7
answers
1.3m
views
How to make read-only file system writable?
At some point, the filesystem on my digital audio player has become read-only. I cannot copy files into it or remove files on it.
Are there some possible reasons for the player's file system to ...
148
votes
1
answer
867k
views
Give user write access to folder [duplicate]
How do i give the user 'testuser' write privileges on the folder: /var/www/test/public_html
144
votes
3
answers
275k
views
What is the "t" letter in the output of "ls -ld /tmp"?
When running the command ls -ld /tmp, the output would be:
drwxrwxrwt 30 root root 20480 Mar 11 14:17 /tmp
So I have two main questions:
What is the letter t after the permissions?
As far as I know ...
132
votes
1
answer
148k
views
Cannot echo "hello" > x.txt even with sudo? [duplicate]
Possible Duplicate:
sudo & redirect output
I'm trying to create a file in /var/www, but even with sudo this fails:
user@debVirtual:/var/www$ sudo echo "hello" > f.txt
-bash: f.txt: ...
118
votes
6
answers
154k
views
Using rsync with sudo on the destination machine
Having a problem that rsync does not set UID and GID as expected, my gut feeling is that rsync should be run as root on the destination machine.
I can't login as root via SSH, since that's disabled ...
117
votes
4
answers
240k
views
How do I run wireshark, with root-privileges?
A standard installation of Wireshark doesn't give the program permission to access the network interface.
I suppose I have to run the program with sudo, but do not know how to add it to the icon - ...
117
votes
6
answers
504k
views
Use chown to set the ownership of all a folder's subfolders and files?
How can I use the chown command to change the ownership of all a folder's subfolders and files?
110
votes
6
answers
348k
views
Apache: access denied because search permissions are missing
I know this question is asked a lot, but the solutions I saw didn't work for me.
I only have one virtual host enabled, and I'm trying to enable access to a folder that's not under the document root
...
109
votes
7
answers
367k
views
What is the difference between "chmod +x" and "chmod 755"?
When it comes to making a file executable what is the difference between chmod 755 and chmod +x and when would I use which? I so far have only used chmod +x and I just read something and it used chmod ...
105
votes
8
answers
177k
views
How to enter a directory with the 'cd' command if it has 700 permission and is not owned by me?
I tried to use sudo cd name_of_dir but am getting the error message:
sudo: cd: command not found
Is there any other way to enter a directory owned by another user which has 700 permission?
97
votes
10
answers
644k
views
How to display file properties via terminal?
What is the command line that displays file informations (or properties), such as in GUI method Display properties in GNOME?
I know that ls -l shows properties; but how to display the same ...
97
votes
16
answers
432k
views
"Welcome to emergency mode!" Think it is a fsck problem
My computer booted to a black screen with this error message.
Welcome to emergency mode! After logging in,type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl ...
97
votes
5
answers
330k
views
How can I recursively change the permissions of files and directories?
I have ubuntu installed on my local computer with apache / php / mysql.
I now have a directory at /var/www - inside which I have several of my ongoing projects. I also work with opensource ( drupal, ...
95
votes
3
answers
864k
views
What does "chmod +x <filename>" do and how do I use it?
I want to write the Ubuntu analogue of a "batch file" (a shell script). But I don't know how to use chmod +x filename command to make it so that the script can be run. Nor do I know where to use it.
94
votes
2
answers
339k
views
What is the www-data user?
I'm working through How To Serve Django Applications with uWSGI and Nginx on Ubuntu 16.04. At the end of the "Create a systemd Unit File for uWSGI" in the article they discuss the www-data user. What ...
92
votes
4
answers
840k
views
How can I give full permission to folder and subfolder
I'm new to Ubuntu and need to create a new folder in /var and need all users on the machine to have full permissions to this folder.
How should I proceed?
92
votes
3
answers
511k
views
How to run Visual Studio Code as root
I recently installed Visual Studio Code editor. I downloaded the 32bit .deb package. Installed and run normally, but when i tried to save a file in my project folder, it returns permission denied. So, ...
89
votes
6
answers
1.6m
views
How can I chmod 777 all subfolders of /var/www?
I’m running a webserver and FTP server, wherein /var/www is bound to /home/user/www.
I set both directories to chmod 777 (which is fine since it’s for testing only).
I can upload files into /home/...
89
votes
2
answers
300k
views
Allowing a group Read-Write Access to a directory
I have two users, user1 and user2, that are both members of groupA. user2 has a folder in their home directory called folderA. If they wish to allow read-write-execute permissions for all members of ...
88
votes
1
answer
102k
views
docker warning config.json permission denied
I just installed docker and created a group and added my username to it to avoid using sudo every time. However when I do the test and run docker run hello-world it gives me following error:
WARNING: ...
87
votes
5
answers
137k
views
Group permissions allow, but still get permission denied
I have a ext4 partition and I've set the group owner for all subdirectors to mygroup:
# chgrp -R mygroup /mount/abc
# chmod -R g+swrx /mount/abc
My user is part of that group. Inside that partition ...
83
votes
6
answers
135k
views
Read / Write permissions in /opt directory
I installed Android Studio in my /opt directory without a hitch and have been using it. Recently, though, Android Studio informed me of an update. It won't perform the update, however, because it says ...
83
votes
3
answers
73k
views
What is the difference between the 'sudo' and 'admin' group?
I noticed that two groups are granted similar-looking permissions in /etc/sudoers:
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute ...
82
votes
1
answer
506k
views
Changing Ownership: "Operation not permitted" - even as root!
I am trying to help a user solve an issue with a bootable USB drive, but there seems to be a file whose ownership cannot be edited. I thought it would have been possible with:
sudo chown user:user ...
80
votes
2
answers
68k
views
Why shouldn't /var/www have chmod 777
When developing a page on a localhost, I sometimes get a "Permission denied" error which I can solve by running chmod -R 777 /var/www. However, people are telling me that this is a bad idea for ...
73
votes
3
answers
265k
views
What command changes the Group setting for a directory?
I am having an access problem to some files and directories that I have tracked down to the group assigned to access them.
When I manually change the name of the group in the properties/permissions ...
73
votes
1
answer
44k
views
What is a "system" group, as opposed to a normal group?
I need to add a group of users to my system. I read the adduser and addgroup manpages and the question here about "users" and "system users".
I need clarification with groups and system groups, ...
72
votes
11
answers
104k
views
Permission denied error when running apps installed as snap packages - Ubuntu 17.04
I get Permission denied error when running a snap application, where my home directory is mounted on an nfs mount point that does not allow root-write.
This is not an unusual configuration, so I ...
71
votes
12
answers
62k
views
What if I accidentally 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 a few seconds, but now I'm starting to have problems. For example, sudo isn't working anymore:
sudo: must be ...
69
votes
5
answers
80k
views
How do I add myself back as a sudo user?
I clean-installed Ubuntu 11.10 today, and then installed VirtualBox. This required me to add myself to the vboxusers group, and since 11.10 seems to no longer have a graphical app to add users to a ...
68
votes
6
answers
68k
views
What is the main difference between chmod and chown?
In some examples, I saw that some used chown instead of chmod. I do not know where to use chmod and chown. Please explain to me the difference between them, when and why I should use either.
68
votes
5
answers
342k
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 ...
68
votes
7
answers
350k
views
How do I allow a non-default user to use serial device ttyUSB0?
I have an Ubuntu 11.10 system with 2 users:
The first was created during the installation
The second instead was created after. It belongs to the sudoers group.
Now the problem is that when the ...
66
votes
3
answers
357k
views
Permissions problems with /var/www/html and my own home directory for a website document root
I'm trying to not give 777 permission in my /var/www/html folder, but I want to edit my files without sudo. So I thought to create a symlink of a folder in my home directory within /var/www/html. I ...
65
votes
6
answers
38k
views
Why do we need to be root in terminal for shutdown and restart?
When we install/remove/update packages or make any changes which require administrative privileges we are prompted for the password of admin user who has the sudo privileges - this happens both via ...