Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
129 views

PHP Unable to Read /home Folder

I am having an issue with a PHP script not being able to read a user's /home folder. This is an issue on a server running AlmaLinux 9.4, my other server running CentOS can read the folder. The error ...
Rick Boklage's user avatar
0 votes
1 answer
271 views

How to allow other users to modify files uploaded to SFTP server (login as other user)

I have an SFTP server and I can send files to it as let's say user1. I have another user (user2) in that server and I want to be able to remove/modify files uploaded to the user1's configured sftp ...
Muslimbek Abduganiev's user avatar
0 votes
1 answer
302 views

Mounting the GCP Cloud Storage bucket to Directory as a non-root user

I'm running the one service on the Linux based instance in GCP. So for running the service, i have created the one user & group for that i.e.; user: test-user group: test-group Then i need to ...
RAM's user avatar
  • 1
0 votes
1 answer
748 views

is /etc/sudoers writable or not

The default permission in /etc/sudoers file is readonly for root and group root as in picture is obvious : So when you open it with any test editor it can't be written and give error read only. now ...
Salar's user avatar
  • 174
2 votes
2 answers
708 views

How should I modify file permissions to accomodate Wordpress

I have been successfully using the method described here: Maintained by a Single User and it has been working well for me. This is my script for all my websites: sudo chown -R WebAdmin /var/www/...
Chiwda's user avatar
  • 125
0 votes
1 answer
875 views

SFTP only user can't see files in a directory when that directory has read access to public users

I have a user which I have called username in the below code, in the sshd config file there is this: Match user username ChrootDirectory /media/pi/128db83f-859d-48dc-a784-4337c53c736f/username Match ...
Paul's user avatar
  • 115
0 votes
2 answers
158 views

Are there any potential pitfalls to changing the permissions of config files under /etc to a non-root user?

There are various services which are being run on our machines, e.g. cassandra, datadog, etc. Occasionally, we need to change the configuration, and we wish to automate the propagation of the config ...
ranban282's user avatar
1 vote
1 answer
966 views

Rsync makes the destination folder unwritable before copying files to it (and then of course it fails with Permission Denied)

I want to use rsync to deploy a project from my dev machine (Windows 11, CygWin) to a remote server (Ubuntu) through SSH. I've made sure that my SSH user has full write access to the destination ...
Lázár Zsolt's user avatar
0 votes
2 answers
822 views

Cannot read wordpress PHP files in NGINX - HTTP error 500

I have uploaded Wordpress files to /var/www/html/mysite.com, given recursive permissions 755 and recursively owned by www-data:www:data I use the PHP-FPM service running with NGINX as web server on ...
YaRmgl's user avatar
  • 113
0 votes
1 answer
577 views

Is there a tool to check and manage file permissions?

I developed a set of rules for file and directory owner and permissions for our company server. E.g.: Projects/: permission 750, owner root, group internal Projects/* (directories): permission 2770, ...
user10070149's user avatar
2 votes
1 answer
594 views

Can I rely on the 701 permissions to prevent users within the same group from messing with each other's data?

Some time ago I've learned that assigning all users to the same group and setting 701 to their home directories prevents them from messing with each other's data, yet lets a system program, such as a ...
Col. Shrapnel's user avatar
0 votes
1 answer
3k views

Linux file ACLs are not kept using Docker for new files/containers created by Docker daemon

I am trying to grant read permissions to group grafana-cloud to files under /var/lib/docker/containers: #> ls /var/lib/docker/containers/ | head -n1 ...
Javier Cortejoso's user avatar
0 votes
1 answer
5k views

On CentOS 6, how to let user-created files inherit permissions from their parent directory?

So our servers are set-up like this: Folder structure /asic is our grand project's folder, /200T is a subproject of that grand project, and folders right under /200T such as /lbh are each worker's ...
NoobAdmin's user avatar
0 votes
1 answer
112 views

SELINUX : How to make child folder rule precedence higher than parent rule

SELINUX : How to make child folder rule precedence higher than parent rule eg : /home/kevinw/www/kp/storage(/.*)? all files system_u:object_r:httpd_sys_rw_content_t:s0 lost ...
Benyamin Limanto's user avatar
1 vote
1 answer
1k views

NFS: control file/folder access using groups on the server

I feel a bit stupid to ask as it feels to me to be a very basic question, but anyway I haven't found a solution yet: I have a Linux dataserver and several workstations that mount folders on this ...
hcr's user avatar
  • 15
0 votes
1 answer
3k views

Automatically set owner to new files in a NFS Folder

I have a machine which acts as a NFS server, this machine shares files with others. Developers use the dev-user to upload files to the NFS server, but in the NFS client those files need to be owned by ...
0diseus's user avatar
  • 11
3 votes
1 answer
1k views

Rsync copies all files with executable permission

I ran the following command to back up my home-directory: $ rsync -ahv \ --info=progress2 \ --partial \ --exclude=.cache/ \ --exclude=.miniconda3/ \ --exclude=....
Tim Hilt's user avatar
  • 135
0 votes
2 answers
1k views

Samba clients able to delete each others files. How to block

I have applied sticky bit on Samba share directory. Now client is not able to remove files and directories created by root of Samba server, The issue is many clients access the same directory share ...
vishal bhargav's user avatar
0 votes
0 answers
358 views

Write access to a subdirectory within a read-only directory

I have a home server for my website that is running on a mounted image. I mount the image as follows: sudo mount -o loop,offset=19489299 raspbian-stretch-lite.img I then mount my static website ...
pairwiseseq's user avatar
2 votes
1 answer
1k views

Prevent user to overwrite files and directories

Help me to learn if this scenario is doable using Linux. I want to secure the access to a system path called "/mnt/data". System users retrictions: 'daemon_user': read/write access. 'read_user': ...
MrCatacroquer's user avatar
5 votes
1 answer
110k views

How to change permission of a folder to 777 in Dockerfile?

I have a project directory like this: |-var/www |-docker-compose.yml |-app |--uploads |---photos |-Dockerfile This is my docker-compose.yml file: myapp: build: context: myfolder ...
ken's user avatar
  • 153
0 votes
1 answer
285 views

Shared hosting: how to prevent a user to see another's files but still have their files writable by Apache/PHP

I have read What permissions should my website files/folders have on a Linux webserver? and here is a linked question. Let's say: /var/www/bobweb/ is owned by bob:bob /var/www/eveweb/ is owned by eve:...
Basj's user avatar
  • 809
1 vote
1 answer
328 views

setfacl inherit permissions without bash scripting

i have this script to add inherit permissions in all directory's, asd=$(find -type d); for a in $asd; do setfacl -d -m "u:pythoncrons:rwx" $a; done my question is, i can set inherit permissions ...
TheBlueZombie's user avatar
0 votes
3 answers
278 views

Root running a command, but force the command to write data as another user

To make this question clearer, let me explain my use case. I have a MySQL database (so an application) that runs with the mysql user, and the database has 2 root users: One accessible from a tcp ...
ZedTuX's user avatar
  • 201
0 votes
1 answer
118 views

Beyond private-keys or passwords, why disable other=read/exec/write access file permissions for "system" (separate from user/application) files?

Summary In Unix, Linux, or BSD systems: Besides private-key or password files, user-private content, or any custom-application-specific reasons (like serving a database of private information for ...
Johnny Utahh's user avatar
2 votes
1 answer
1k views

Why can't user X write to directory despite having default:user:X:rwx ACL on the directory?

As I understand it, this all looks good: iammedemo owns the directory, but iammme has default:user:iamme:rwx, so if anything, iamme should effectively be just as privileged as iammedemo, and be able ...
bbarker's user avatar
  • 161
1 vote
1 answer
6k views

Grant users 'read only' access to NFS share without affecting current permissions

I have a Linux (Ubuntu 16.04) server that roughly 30 users login to with shell access. There are different groups setup which manages their access to folders within /opt/working/shared/. /opt/working/...
jblz's user avatar
  • 225
0 votes
2 answers
338 views

Updating user files on no login account on Linux, without using root?

I am working with a Linux embedded system. It has a special account that is used to run software compiled by the manufacturer's programming environment. This account purposefully has the login ...
jeffry7's user avatar
5 votes
1 answer
5k views

File Permissions have Question Marks? How did this happen? How to scan for them?

I have a bunch of files that are messing up my backup system (via rsync). The permissions are all question marks. How does this happen? How do I find them / scan for them? This partially breaks my ...
user708503's user avatar
0 votes
1 answer
2k views

ProFTPD on Debian: Set read, execution and write permissions to new uploaded files (and then delete it by software)

I have activated an FTP server with ProFTPD on Debian Server 8.11. I would like that the new uploaded files via FTP has 2 features: read, execution and write permissions of the user&group (by ...
Kiuki's user avatar
  • 101
1 vote
0 answers
263 views

How to disable the locate command, when used by an ordinary user, from printing file paths that belong to other users?

On Debian with mlocate installed, the locate command seems to print file paths matching a given pattern regardless of the owner. This is a bit privacy instruing. How can I prevent mlocate from ...
xuhdev's user avatar
  • 992
1 vote
1 answer
242 views

The write permission of files disappear after the files are copied between 2 remote system using FTP

I have setup FTP between 2 remote systems and scripts are set up on both the system to Archive and Extract the file. So the script in the source Archives(tar) file and the script on the destination (...
Johnny_doubts's user avatar
1 vote
2 answers
2k views

Sticky bit resets after every reboot

I've got a CentOS server that performs a few dedicated tasks, where different processes/users need to full access to each others files. As these files are temporary in nature, they are stored in the /...
kasimir's user avatar
  • 203
2 votes
1 answer
1k views

Set default file permission mode without ACLs

I have an AWS EFS share, which does not support filesystem ACLs. How can I set a folder inside the EFS share to default to mode 664?
spiffytech's user avatar
  • 1,123
1 vote
1 answer
811 views

User Group permission for apache website

Apache is running with www-data:www-data I added a user sudo useradd -s /bin/false -d /var/www/dev -m dev and added to www-data group sudo usermod -G www-data --append dev uid=1001(dev) gid=1001(...
Bivas Mandal's user avatar
0 votes
2 answers
325 views

Linux & NFS: Atomic compare-and-exchange of file ownership

My IT department made an error and chowned every file on the filesystem to root:OurGroup. Then their automatic backup (i.e. .snapshop) system created a snapshot, so we no longer have a reference of ...
iAdjunct's user avatar
  • 141
1 vote
0 answers
49 views

Why can a logged in root account modify this file, but I can't when using sudo

I have a file on my Debian Stretch server that has the following security attribute: -rw-r--r--, owned by root. If I login as root directly (su -), I can edit and save it. But if I try to do sudo ...
contactmatt's user avatar
2 votes
2 answers
16k views

Permission denied when Nginx tries to write image file

I'm using Nginx for a Linux server and I have this folder /usr/local/openresty/nginx/webfolder/img where I want nginx to save my uploaded image files. So, this is what I did: 1) I changed the owner ...
Joshua Rajandiran's user avatar
0 votes
1 answer
276 views

Setting folder to have fixed user and group

Years ago I signed up for a VPS that had a custom CMS for setting up new virtual hosts. One of the features I really liked was when a new host was created it set up a new folder with a new user for ...
user467703's user avatar
0 votes
1 answer
2k views

Linux files permissions denied on log files

I have installed nxlog to send my logs to a graylog server. It works fine, but I have a denied permission on the logs of my HIDS Ossec. My process nxlog (launched by collector-sidecar) run as root : ...
Sorcha's user avatar
  • 1,345
1 vote
1 answer
552 views

Permission Denied When Writing/Deleting Despite Proper Permissions

First off, yes the parent directory has correct permissions. Now that that's out of the way, here's the deal. My users cannot write or rm from /mnt/file-server/reports/vendor/client/2018/02-04-02-10/...
brenden's user avatar
  • 11
1 vote
1 answer
2k views

Dovecot can't open log after upgrade

On an OpenSUSE Tumbleweed host, updated this morning. After the update and a reboot, every attempt to start dovecot fails with Can't open log file /var/log/dovecot: Permission denied cat /etc/os-...
ShadSterling's user avatar
0 votes
1 answer
2k views

SELinux: how to allow httpd to delete temp files from MySQL?

Here's the setup: I let MySQL dump tables to /tmp (they just contain numbers, no real data) for PHP to pick up and process. After this, the temp files are no longer needed, so I delete them with PHP (...
kasimir's user avatar
  • 203
0 votes
2 answers
763 views

Permissions not inheriting to files and folders in Linux mint

We are using Linux mint with ext4 file system mounted with acl option, I want to set a folder such that anything created within it directories or files inherit default permissions and group = 775, I ...
user313162's user avatar
0 votes
1 answer
7k views

Why am I getting “Permission denied” while trying to create a file

jenkins@hostname:~/dir1/dir2$ ls -ld /some-nfs drwxrwxrwx 121 171 146 6290 Feb 8 15:38 /some-nfs jenkins@hostname:~/dir1/dir2$ ls -ld /some-nfs/important-dir drwxrwxrwx 3 jenkins jenkins 28 Feb 8 ...
Ankur Agarwal's user avatar
16 votes
3 answers
6k views

Program file exists in /usr/bin, but cannot be used

Clearly my file exists in /usr/bin $ ls /usr/bin/ngrok /usr/bin/ngrok However, when I attempt to chown it I receive an error $ sudo chown my_user:users /usr/bin/ngrok chown: cannot dereference '/...
Jorik's user avatar
  • 177
0 votes
0 answers
30 views

How to enable users to manage certain groups on file server

Let's assume we are in a business environment and we want to configure a *nix/*BSD file server. The business does work for several customers, thus the folder structure has the clients' names on the ...
Phil's user avatar
  • 21
-1 votes
1 answer
985 views

Best practices for user account audits in Linux machines

What is a good way to audit the user accounts on a Linux machine? I will like to have a list of users, the folders they can access and the process they are running, so I can pinpoint security risks, ...
DomingoSL's user avatar
  • 415
-1 votes
1 answer
264 views

visudo + read access to file from non root user

how to access file by visudo from non root user , or other option for example when we change user to hdfs and from user hdfs we want to print the file - file.cfg we get Permission denied how to ...
jango's user avatar
  • 79
6 votes
3 answers
11k views

How to Fix Directory with all Question Marks as Permissions

I'm using CentOS 7 and trying to list a directory's contents but can't. When I try to list the contents, I get the following output: [entpnerd@myhost ~]$ ls -ali /data/sharedlogs/otherhost/ ls: ...
Jon Thoms's user avatar
  • 165

1
2 3 4 5