Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [permissions]

Permissions are the Unix way of controlling access to resources such as files, directories and devices and may be specified for an owner, group, or all users.

0
votes
1answer
28 views

Logrotate “permission denied” error

I am trying to get logrotate to work and keep getting the follow error message. /etc/cron.daily/logrotate: error: error accessing /ftp/logs: Permission denied error: error opening /ftp/logs/...
1
vote
1answer
118 views

How to interpret line in sudoers

Lets say I was told to do sudoers file changes with the following... What does that mean, and how do I actually do it? www-data ALL = NOPASSWD: /bin/rm /etc/vsftpd/vusers/[a-zA-Z0-9]* I ...
62
votes
5answers
216k views

What is the right file permission for a .pem file to SSH and SCP

I have tried to SSH into my AWS Ubuntu server and copy the directory to my local machine. Throughout the process I experience different file permission errors (noted below). Is there one specific ...
249
votes
4answers
396k views

How to set default file permissions for all folders/files in a directory?

I want to set a folder such that anything created within it (directories, files) inherit default permissions and group. Lets call the group "media". And also, the folders/files created within the ...
0
votes
0answers
25 views

Can't copy file with read permissions

I have a file which I can't seem to copy even though I have permissions as user1 > sudo -u user1 cp item1 some/nested/dir cp: cannot create regular file 'some/nested/dir/item1': Permission denied ...
23
votes
2answers
58k views

How to remove ACL from a directory and back to usual access control?

We use a hosting server of FreeBSD 10.3, where we don't have the authority to be a superuser. We use the server to run apache2 for web pages of our company. The previous administrator of our web pages ...
2
votes
2answers
547 views

openvpn route-up script fails when run from systemctl

I have a set of programs that must run through VPN and shouldn't have internet access when VPN is not connected on Arch Linux. I do this by creating a network namespace that would contains VPN network ...
0
votes
1answer
24 views

Why can't my webserver write (PERMISSIONS ISSUE)

I have this filesystem $ ls -la /var/www/myapp/api/project/files/ total 12 drwxrwxr-x 3 me me 4096 Jun 17 14:28 . drwxrwxr-x 10 me me 4096 Jun 17 14:27 .. drwxrwxr-x 2 me me 4096 Jun 17 14:28 cache ...
0
votes
1answer
1k views

Samba shared folder with setgid problem

I am setting up a file server with a shared directory. Inside, there are per-user folders that are readable by any user and a shared directory that is readable and writeable by any user. The per-...
1
vote
0answers
23 views

tor fails in systemd, will start in foreground

I am trying to get tor running on a Pi Zero using systemd (start at boot). Tor will start as a foreground #/bin/tor Jun 16 00:53:57.920 [notice] Tor 0.4.0.5 running on Linux with Libevent 2.0.21-...
0
votes
2answers
36 views

Restrict a user to home directory without modifying /home/%u permissions

I'm still a novice with Linux. I'm building an Ubuntu mail/web server that multiple users will use. I would like to restrict users to their home directory so they can login, change their password, or ...
3
votes
5answers
6k views

Set the default permission when creating a file

When I create a file, the permission is 644 (user rw, group r, other r). How can I make the default file generated to have permission as 664?
1
vote
1answer
88 views

apparent permission problem with USB devices

I've got problems with adding USB devices in virtualbox when it's started as user. Starting it as root seems to work fine but when I start it as user, I get: $ VBoxManage list usbhost Host USB ...
1
vote
2answers
1k views

How to change permission of /proc/self/pagemap file?

I want to change the pagemap file permission to 755 or 744 using sudo chmod. But the command is throwing error saying operation not permitted. The motivation is to allow a user read the pagemap file (...
2
votes
1answer
66 views

Why choose a umask of 002 over 022?

I was cleaning up groups and permissions on my home system today, and re-familiarized myself with umasks. It seems that the default on my system (Ubuntu 18.10) is 002, but that for root it's 0022. ...
1
vote
0answers
16 views

to set the default permissions on files under a specific folder

Scenario: We're receiving the below files from upstream which is a mainframe system. -rw-rw---- 1 s36748 xyz 293 Jun 6 19:20 CSJ_H_20190606.csv -rw-rw---- 1 s36748 xyz 3284 Jun 6 19:20 ...
1
vote
2answers
11 views

Removing mount default execute permission of text files

I want to mount all text files without execute permission to eliminate the (Run in Terminal - Display - Run) message, which appears every time I open a text file in Linux Mint. I have the following ...
4
votes
4answers
9k views

Why is the default umask value for useradd in openSUSE set to 022?

I recently built a very simple test environment with openSUSE. As I tried to configure a shared directory, without using ACLs, but with SetGID on that directory instead for some reason, I noticed ...
12
votes
1answer
8k views

gpg: WARNING: unsafe ownership on homedir '/home/user/.gnupg'

System: I am testing Linux Mint 19 Beta based on Ubuntu 18.04. I got this warning while installing an unrelated package: gpg: WARNING: unsafe ownership on homedir '/home/vlastimil/.gnupg' This is ...
0
votes
1answer
22 views

Proper permissions for Laravel project in /var/www/html

I want to create a Laravel project in /var/www/html using composer. Since composer won't allow you to run as root, I can make a directory and give it all the permissions 777 but I don't think that's a ...
0
votes
2answers
49 views

Can you still access the current directory (or root directory), if your user does not have permission on that directory?

It is possible for a program to inherit or be passed an open file descriptor, for a file it would not otherwise be permitted to read (or write). For example: (sudo -u nobody echo "hello world") > ...
0
votes
0answers
14 views

How to copy ownership and permissions using rsync but not the files

I am using AWS CodeDeploy to copy files from git to the server. It can't overwrite the files, so I have to move the files to another temp location and then it moves the files from the repo to the ...
0
votes
1answer
52 views

How to prevent someone with remote access from changing my file permissions?

If someone gets unwanted remote access to my computer/OS, what's to prevent them from opening a terminal and changing the permissions on my files? I have a FW that is very good, but, let's assume ...
1
vote
2answers
26 views

Discard “access denied” stderr natively in find

Is there an option in find that allows me to suppress the error messages that I get from it trying to access directories for which I don't have access? I know I can just discard stderr, but it seems ...
20
votes
8answers
53k views

Vim Error E138: Can't write viminfo file $HOME/.viminfo!

I'm afraid I've run into something rather strange. When I open a file normally, vim README.txt, everything is fine. But upon sudo vim README.txt, the file renders blank, and gives me a E138: Can't ...
0
votes
0answers
21 views

Chromeos Linux Beta

I am attempting to install Krita on my chromebook. I have 'turned on' linux beta and chromeos prompts me that 'Shared folders are available in Linux at /mnt/chromeos...' Issue debian@penguin:/mnt/...
1
vote
1answer
31 views

Cron Job Console Connect and Root Permissions

I'm working on a script for user Bob with the relevant parts shown below. Problem I'm having is if I put this cronjob under user Bob, zenity will work but shutdown wont. And if I put it under root ...
0
votes
1answer
1k views

ntfs issue with rsync: read errors mapping permission denied (13)

I have an issue when I want to rsync folders from my external backup hard disk to my NAS. I get this error : read errors mapping permission denied (13) I have root rights; if I want to change the ...
0
votes
0answers
33 views

How to use read-only permissions to prevent corruption on a writeable filesystem?

I'm developing an embedded Buildroot OS for the Raspberry Pi. This system will be turned off by simply removing power (there will be no shutdown timer), therefore it must be able to handle poweroff ...
7
votes
4answers
1k views

facl ignoring the “x” permission but only on files

When I use setfacl to manage on what permissions should the children files / directories have, for some reason the files have all the permissions except the execute ("x") one. someuser@someuser-MS-...
0
votes
1answer
28 views

Set File Permissions to Default from Umask

https://geek-university.com/linux/set-the-default-permissions-for-newly-created-files/ So I want my umask (command) which in this case is 0002 to be subtracted (bitwise) from 666 for files and 777 ...
3
votes
0answers
29 views

How to mount files as specific user when using docker namespace remapping?

Problem description: I have a webservice using docker to run nginx and haproxy (among other containers). I want to provide these docker images via a private docker hub registry, and thus don't want ...
-1
votes
2answers
82 views

How to test file permissions using shell script?

I am testing if my file has read permissions, by running this script as root: #!/usr/bin/env bash FILE="/etc/shadow" if ! [ -r $FILE ]; then echo "Hello" fi exit 0 Ideally, script has to print ...
1
vote
1answer
39 views

Bash Script to create a file for each unique permission in a listing/find command and printing each directory/file path instance of that permission

I'm trying to create a bash script that will be able to perform a find command to get the permissions and full path of every file/directory in a directory tree and create a file for each unique ...
18
votes
2answers
65k views

Give user read/write access to only one directory

I'm running a server, and I need to give read/write access to a particular directory to a single user. I've tried the following: sudo adduser abcd sudo groupadd abcdefg chown -R .abcdefg /var/www/...
0
votes
1answer
18 views

Dealing with USB drive read/write operations in scripts with no sudo privileges

I'm developing an application which at some point needs to write in a USB drive unit. The application gets executed with non-superuser permissions and I've thought the best way to write on the drive ...
0
votes
0answers
20 views

What permissions are required to see USB langid as a user?

As a user, I need to be able to read the langid of a USB device. Run as my user, the output of lsusb -v it gives me limited information on all USB devices (note second line) Bus 001 Device 002: ID ...
0
votes
0answers
26 views

ACL not working as expected [duplicate]

I am using a Centos7 machine. I have created an user named bob and assigned him read and write permissions to a folder named "/var/www/html" using the command setfacl -R -m u:bob:rw /var/www/html/ ...
10
votes
4answers
39k views

su: Permission denied despite correct password

In my new Gentoo installation, su doesn't work as my non-root user: After entering the correct password I get the message "su: Permission denied". What could be causing this? I have already tried ...
2
votes
1answer
51 views

Users, groups and others in a single user desktop installation [closed]

I understand how permissions can be granted and revoked, owners changed and so on. I'd like to know if the groups' or others' attributes matter at all when I am the single user of a desktop edition (...
1
vote
1answer
37 views

How to express `find`'s -writable and -readable tests, when they are not available?

Sometimes on old Linux systems, I experience that find doesn't support -writable and -readable tests, which test whether the file or directory is writable/readable resp. for the current user. Say, I ...
1
vote
1answer
889 views

Permission denied on sysfs files

I'm messing around with my raspberry pi, and currently I'm trying to change the color of one of the LEDs on the board executing a shell script and its arguments: pi@raspberrypi:~/morpheus/scripts $ ...
0
votes
0answers
40 views

upgrade openssh rpm error: unpacking of archive failed on file /usr/bin/ssh-keygen: cpio: rename failed - Permission denied

rpm -Uvh openssh-5.3p1-124.el6_10.x86_64.rpm openssh-server-5.3p1-124.el6_10.x86_64.rpm openssh-clients-5.3p1-124.el6_10.x86_64.rpm openssh-askpass-5.3p1-124.el6_10.x86_64.rpm warning: openssh-5.3p1-...
0
votes
1answer
2k views

Puppet Recursive File Permissions

When using a Puppet file resource with recurse=>true is it possible to have directories and files get different permissions? That is we generally want to remove read/execute permissions from group ...
4
votes
1answer
15k views

How to edit /var/www files using phpstorm?

I want to edit the /var/www files using any editor like phpstorm or eclipse etc, without changing the default user/groups setting for /var/www. Since phpstorm is invoke by a script, I don't know how ...
31
votes
10answers
190k views

VSFTPD, 553 Could not create file. - permissions?

I've set up VSFTPD on Amazon EC2 with the Amazon Linux AMI. I created a user and can now successfully connect via ftp. However, if I try to upload something I get the error message "553 Could not ...
3
votes
2answers
4k views

“Error: permission denied” error from Transmission Client

i have done the following on my Asus WL-520gu Installed the dd-wrtv24-sp2 mini svn:13064 Updated for usb support Installed optware package Activated the transmission client but i keep getting a ...
0
votes
1answer
1k views

FTP Permissions in Linux (vsftpd)

Let's suppose I have a user called user1 and his home directory is on: /home/user1. All files on that directory need to be 750 (chmod -R 750 /home/user1). I installed vsftpd so I can manage my files ...
34
votes
3answers
31k views

systemd: permission issue with mkdir & ExecStartPre

I've got a problem with this (shortened) systemd service file: [Unit] Description=control FOO daemon After=syslog.target network.target [Service] Type=forking User=FOOd Group=FOO ExecStartPre=/bin/...
0
votes
0answers
21 views

Hide folder that user uses currently

I'm searching for a ftp server or any idea to achieve hiding folder from others when somebody is working in it. For example: I have 3 folders: A B C when I working in A, anybody who is also connected ...