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.
4,456
questions
0
votes
0
answers
29
views
What caused USER to have "root" as OWNER and GROUP instead of the user's name? How do I change it?
/home (machine 1)
PERMISSION | OCTAL | OWNER GROUP NAME
drwxr-xr-x | 755 | root root .
drwxr-xr-x | 755 | root root ..
drwxr-xr-x | ...
0
votes
0
answers
29
views
vim: cannot edit the file ~/.config/hypr/hyprland.conf; not even as root [closed]
Here is what I have tried:
[username@Nitro5 ~]$ sudo vim ~/.config/hypr/hyprlan.conf
[sudo] password for username:
[username@Nitro5 ~]$ sudo vim ~/.config/hypr/hyprland.conf
[username@Nitro5 ~]$ su
...
4
votes
1
answer
87
views
When (and how) are file permission/access decisions made in kernel space?
(I think) I have a relatively good understanding of how Linux permissions work - traditional Unix DAC permissions, and how they're represented, security context in relation to processes (i.e. cred ...
-1
votes
0
answers
57
views
Linux permissions [closed]
I created a user named Tom and tried to open a file of user David, which has permissions:
-rwx---rwx 1 tom devops 15 Mar 24 19:59 test1.txt*
I expected Tom to be able to open the file because the ...
0
votes
0
answers
33
views
Problem with permissions when supervisor used in php docker image
I am building my app using official php docker image.
Case 1: When I run supervisord with root user and subprocess php-fpm with www-data user. I always get this error log:
FPM initialization failed
...
-1
votes
0
answers
17
views
Not able to perform SFTP to another target server with same public key
I am trying to test the sftp connection to two target linux servers from the same USS source server. I had generated the public/private key pair in the source side and copied the public key to one ...
0
votes
1
answer
33
views
how to configure sudo to allow certain parameter
In particular I want to allow the following command without password:
sudo cfgutil --ecid "${Device_ECID}" install-application "${in_File_Name}"
With Device_ECID and in_File_Name ...
0
votes
0
answers
19
views
elasticsearch cannot read certificate file - linux file permissions
I generated a certificate file with certbot. It is placed in /etc/letsencrypt/....
I created a group called elk where I added the elasticsearch user, and I recursively set it as the owning group for /...
1
vote
0
answers
45
views
How was the formula for calculating umask derived?
When using umask, I know that to get the resulting permission, the mask is first NOTed and then it is ANDed with the default permission (777 or 666).
Now my question is, how was this formula derived? ...
0
votes
0
answers
33
views
copy file owned by another user to my account
I have two accounts, dnc1 and dnc2, both are not root accounts.
I want to login dnc1 account and copy a file owned dnc2 to dnc1 directory. The file mode is 644 and the folder containing it is 755. So ...
0
votes
0
answers
17
views
"Failed to set ISR" on Raspberry PI 4
I'm trying to execute a compiled software on a Raspberry PI 4. When I execute it, I see this error message:
Failed to set ISR
: No such file or directory
Has anyone come across this message?
I did ...
-1
votes
1
answer
43
views
Handling permission error properly in a script
I have a script that does the installation of several modules
based on a JSON file describing all the modules.
Looping on each module, I call its install script.
# Create install log destination
...
3
votes
1
answer
221
views
Why does chown reset/remove the SUID bit and reset capabilities?
This command:
sudo chown -R root:root directory
will remove the SUID bit and reset all capabilities for files. I wonder why it's done silently and it's not mentioned in the man page. Weirdly the GUID ...
1
vote
1
answer
33
views
Permission denied when opening a file in gdb
I'm implementing some CTF challenges. The flags are in some text files, that get read from the programs. To protect the flags I have changed the owner of the files, but have set the setuid to the ...
0
votes
0
answers
22
views
Custom home directory leads to permission error when logging in with "su -l"
When I create a user with a different home directory on a Linux system like this:
# useradd "svcjohn" -U -r -m -d "/var/lib/svcjohn"
I get an error like this:
# su -l svcjohn
...
0
votes
1
answer
60
views
How to programmatically determine whether superuser elevation is necessary to invoke code?
When providing code to another, it appears to be good practice to remove all elevation-specific code — that is, provide apt update rather than sudo apt update (or su -c 'apt update'). However, this ...
0
votes
0
answers
19
views
Umask questions in mount [duplicate]
I have a question regarding 'umask.' I have an extra disk on my Linux system, and I want it to mount during startup with the same permissions as '/home.' For example, my '/home' has these permissions:
...
1
vote
0
answers
28
views
Difference between non-executable directory with and without write
Is there a difference between a directory that is not writable (and not executable) and one that is writable (but still not executable)? It seems to me that they are equivalent, because creating/...
0
votes
0
answers
11
views
fedora - login to cockpit web gui using ldap credentials
Fedora 39 server configured to allow ldap users to login if they are member of a specific ldap group. The same ldap group is in the sudoers file, so after login users can sudo (set to allow sudo ...
0
votes
1
answer
42
views
can't get permissions for debug folder with a custom program
I am running a program on kali Linux. The program uses Openssl and some other networking libraries. When I try to run the program I get the output below:
Failed to open /sys/kernel/debug/ieee80211/...
1
vote
1
answer
72
views
How to run a command/program using system account in Linux
My goal is to run LDAP search and get a password for a gMSA account.
I have an Ubuntu VM which is Dev_Linux.
My user account is sja.
I want to run LDAP search using the Dev_Linux account. I refer to ...
0
votes
1
answer
47
views
Permission Issue - Granting access to copy files with root ownership
I have several files that are owned by root that I want to backup, using another user. I do not want to give this user access to all of root, just these particular directories and files.
Like /etc/...
0
votes
0
answers
30
views
SUID not running as file owner [duplicate]
I'm trying to check how the SUID works, and I have created a binary with the shc compiler from this script:
#!/bin/bash
echo "I'm the script"
sleep 5
cat /srv/test/secret
The binary is ...
0
votes
0
answers
26
views
Linux recursive permission inheritance
I am wanting to allow file/folder permission inheritance.
On my machine, I want some directories to belong to some user/group. This is achieved by running: sudo chown my_user:my_group my_directory. A ...
0
votes
1
answer
67
views
Cannot write into `/sys/power/mem_sleep` in debian
When using sudo tee or sudoedit, I am getting an Invalid argument error.
sudoedit: unable to write to /sys/power/mem_sleep: Invalid argument
sudoedit: contents of edit session left in /var/tmp/...
1
vote
1
answer
54
views
Changing permissions of a symbolic link (exercise from school) [duplicate]
My school asks me to create files and directories in such a way that the ls -l output looks like that (XX are not taken into account):
I've done everything right, except for the symbolic link at the ...
0
votes
0
answers
21
views
Controlling `install` permission for automatically created directories?
is it possible to create directories when the same permissions using install?
for example
$ ls -la /srv
drwxr-xr-x 1 root root 202 2024-02-01 15:07 .
drwxr-xr-x 1 root root 226 2024-02-01 15:12 ..
$ ...
-1
votes
2
answers
115
views
Unexplained mv permission denied for directory with ACL
I have a folder A inside a folder B, which is in turn in a folder C (all on the same file system). I want to mv A from B to C, but I get a permission denied error.
I can mv A within B (i.e. rename A)
...
1
vote
3
answers
92
views
is there a way to allow only a single proccess to delete a file?
Is there a way to allow only a single main process to delete an original file?
Other processes may read and modify it, but not delete. I know a process can empty its contents but there is no problem ...
0
votes
1
answer
34
views
Systemd executable failed to read file from CacheDirectory with Permission Denied
I have a Golang binary that runs every 5 mins. It is supposed to create & update a text file which needs to be write restricted. To run this binary I created a systemd service and a systemd timer ...
0
votes
0
answers
37
views
Understanding group permissions - can't cd into a folder owner by group that I am member of
Can someone please explain to me why I am unable to cd into the folder 2024 in this screenshot (the OS is truenas scale):
the folder I am in has a folder called 2024 that is owned by another user - ...
0
votes
1
answer
73
views
Mount samba share so it's owned by root and users of a group can read/write
I'm trying to mount a samba share ho that it is owned by root and users of a group called smbshare can access it, read and write files in it.
I tried putting this in my /etc/fstab:
//fs/myshare /media/...
0
votes
0
answers
34
views
Permission denied for user creating folders in /opt/company/product folder that is owned by the user [duplicate]
My company sells software that installs into /opt/company/product and creates a system user to run the services. The postinst routine uses chown on the product folder.
This is a manual test I did (...
0
votes
1
answer
46
views
Why is the sticky bit mentioned twice in chmod but only once in the ls output?
My task was to configure a directory so that users in a group could only delete files they own.
I used chmod 1771 RandD, as suggested by lab instructions, to accomplish this.
When running ls -l, the ...
0
votes
2
answers
84
views
Crontab doesn't open for user
When I am trying to open crontab I see the next output:
ubuntu@macaroon:~$ crontab -l
crontabs/ubuntu/: fopen: Permission denied
When I add sudo it opens fine however, if the jobs don't work there:
...
0
votes
1
answer
61
views
SQLite3 randomly changes file permissions and owner
I use sqlite3 for a PHP app. The functions I use are from the Sqlite3 package built in to PHP.
I do not normal CRUD actions, including restarting the DB for testing. This includes dropping tables and ...
3
votes
4
answers
256
views
Is traversing a Linux filesystem faster as root
When traversing a filesystem with large numbers of files, is it quicker to do so as root compared to any other user?
For example, if there are several million files under /data, and /data is owned by ...
0
votes
1
answer
47
views
Can't the user which is executing the program access the not permissible files if the SETUID is set? [duplicate]
I have two users first being ace and the second being ej
ace has a file in its home directory, which is a shell script, with the following permission set ( setuid i have used )
-rwsr--r-x 1 ace ace 15 ...
0
votes
1
answer
39
views
NFS3 permissions issue for only some system users
My nfs share is mounted in an ubuntu 22 VM, root, ubuntu and a test user I created can all read/write. However the plex user created by the plex install cannot read or write. When I sudo su plex and ...
7
votes
3
answers
2k
views
Is noexec a standard setting for home?
I have been told that noexec is a standard setting for /home folder for development environments. Can someone provide some references?
Using noexec on /home prevents applications like IDEs, editors, ...
0
votes
1
answer
63
views
How to share user permission across different servers and NFS folders?
I have a 3 different servers running Ubuntu 20. One of them is configured as the NFS host, and the other two as clients. The clients can mount the NFS shared folders and can write content on it sudo ...
1
vote
2
answers
135
views
Create new user with home directory inside another user's existing home directory -- both users must own the sub-directory
Here's my situation:
I have a user storageUser with a home directory of /storage
storageUser owns /storage with full (RWE) rights
Within /storage I have a directory media
I'd like to create a new ...
1
vote
0
answers
29
views
permission denied even as root [duplicate]
❯ ./my-project
zsh: permission denied: ./my-project
I just make a partition out of my hard drive (not the same drive with root) with type ext4 so i think it should be fine using it on my linux.
# /...
-3
votes
1
answer
250
views
Why am I not allowed to access files in /usr/bin/?
I have this machine. I am the sole user of the machine. I cannot access files in /usr/bin/ because of a location issue with /usr/lib/python3/dist-packages/printrun/ and am currently receiving errors.
...
0
votes
0
answers
60
views
Install cannot change permission of non existent file
I am doing cross linux from scratch and stumbled in a small mistake related to permissions.
At the stage 5.5 (Linux Header), the reader is supposed to issue a:
install -dv /tools/include
When I do so,...
0
votes
0
answers
29
views
Apache symlink to directory on Raid Drive [not working]
I have a Debian install. It's not my first (but third server, without counting multiple raspberry hanging round)
Let say my user is named "user1"
Novelty for me, I have a
a first disk ...
1
vote
1
answer
39
views
For SSHFS, can directories and file inherit same permissions as parent directory?
Further to this post, I found out that if the permissions for other should be ---, then I can use (it seems to work):
setfacl -R -m d:o::0 test
But when using SSHFS, permissions won't be retained. ...
0
votes
1
answer
253
views
How can I move a file to /usr/local/bin?
For some preliminary information, I am using WSL2. This is my first time using Linux.
I would like to install Typst which is similar to LaTeX.
I have used wget to download the file for my computer ...
2
votes
0
answers
107
views
Sudoers Permissions - User in Multiple Groups
I want to learn to rules pertaining to the effective permissions assigned to a certain user. I've come across this paragraph in Ubuntu's sudoers man page and also in numerous posts here:
The sudoers ...
0
votes
0
answers
18
views
Difference between permissions 700 and 070 [duplicate]
in debain if a owner is not given access to a directory but the group which includes the owner has access to the directory will the owner still be able to access the directory?
A scenario:
If a user ...