Questions tagged [chmod]

A Unix tool for changing file permissions

Filter by
Sorted by
Tagged with
0
votes
2answers
33 views

Recursive chmod of all vhosts httpdocs directories on CentOS/Plesk [closed]

A shared web hosting server running CentOS 7.8 with Plesk has the following directory structure for a few hundred vhosts: /var/www/vhosts/domain1.com/httpdocs/ /var/www/vhosts/domain2.com/httpdocs/ /...
0
votes
0answers
22 views

Security best practice: revoke execution (-x) permissions for directory, or do recursively to change every contained file?

I have a question about security best practice when configuring a device to be used to users, who should be able to use a programme, but not modify the system. Let's say I have a folder /opt/myapp ...
0
votes
1answer
45 views

crontab not working for deleting a old files from log folder

I have this line in my crontab to delete old files: 1 * * * * find /var/log/abc/ -mtime +7 -type f -delete Unfortunately, it does not work. I have attempted to give all users permission to clear ...
0
votes
1answer
149 views

Effect of chmod -R 777 *

A newbie here. Can someone help me understand what are the effects of running the following command from a directory: sudo chmod -R 777 * Will it effect the whole file system or the contents of ...
0
votes
0answers
676 views

How to setup a NFS Server on Mac Catalina, that support chown on Client?

I have set the following configure in /etc/exports on Mac. /Volumes/MacHD 192.168.1.100 (rw,alldirs,insecure,sync,no_subtree_check,no_root_squash,no_all_squash,crossmnt) /Volumes/MacHD is a Volume I ...
0
votes
1answer
72 views

Proper rights and owner for web executable file saving/reading sensitive information

I have app wrote in php that saves and reads sensitive information into file /sensitive/sensitive.txt. File that is saving and reading sensitive information is user.php. The whole app is in a separate ...
0
votes
0answers
36 views

Why use umask in subshell followed by chmod for ~/.ssh/id_rsa

What's the purpose of the pattern below, specifically the umask followed immediately by chmod? The code is taken from the checkout step of the CircleCI. (umask 077; touch ${HOME}/.ssh/id_rsa) chmod ...
-2
votes
1answer
209 views

Cannot write with dir permission 666, but can write with 777 [closed]

I am using Kali as root user. I did setup an atftp server in a folder (created and owned by root) and gave 666 permission on that folder. But I noticed users get permission denied error while ...
0
votes
0answers
227 views

chmod permissions in an ACL folder

I set up a folder managed by ACL, meant to let specific "manager" users have total control over files in it. File access seems ok (e.g. a manager user can delete a file owned by any other user) but ...
0
votes
1answer
420 views

Can't see files when browsing nginx webserver. Incorrect permissions?

I am using centos 7 with nginx 1.12 to host a yum repository locally. When I try to browser the files via the browser, I can see the folders, but no files inside them. Im wondering if i might not have ...
3
votes
1answer
919 views

How to have multiple users access to chmod() the same file?

I have a system where multiple users are running an application that chmod the same file. I've tried using setacl to add both users as user owners of the file to do this, but it doesn't work. The ...
0
votes
0answers
49 views

SSH login are disabled after chmod 444 -R myfolder / [duplicate]

I have accidently ran chmod 444 -R myfoler /. Because of a space it changed root dir permission , I have immediately stopped but now all my login are disabled except root. Please need help asap. ...
-3
votes
1answer
377 views

CHMOD file and directory permissions changing back [closed]

I have a website and I am trying to link an image stored in a directory, however when I change the file permissions to 775 they change back to 644 and the image isn't displaying. It is showing a Error ...
0
votes
0answers
88 views

Allowed SSH user can't edit files in Centos 7

I am working on a remote virtual machine running Centos 7 via ssh. I want to give my user read and write permissions on /var/www/html. What I did is: sudo groupadd webdev sudo chgrp -R webdev /var/...
3
votes
2answers
49 views

Can I reduce CPU usage on a large recursive find + chmod command?

I'm using the following command to perform permissions fixes: sudo find . -type f -exec chmod 470 {} \; There are many thousands of files to update the permissions on. It also spikes the CPU usage ...
1
vote
0answers
163 views

bad ownership or modes for chroot directory “/var/www” [duplicate]

I created a new group and user so it can connect to server using SFTP. This user's directory is set to /var/www. Running ls -ld gave me following result: drwxr-xr-x 4 root sftponly 4096 Aug 12 04:...
1
vote
1answer
2k views

/var/run/screen permissions changing to 775 without restart

Good <Insert Part of Day>, I am currently having an issue with several of my boxes running CentOS 7.3.1611 wherein the permissions for /var/run/screen are being changed to 775, resulting in the ...
1
vote
1answer
179 views

chmod -R +rx on RHEL 7.2 doesn't set permissions

We have an odd problem on some of our RHEL Server 7.2 VM's: Executing sudo chmod -R +rx doesn't change the read/directory flags for any of subdirectories. However, executing sudo chmod -R a+rx works ...
0
votes
2answers
352 views

How to manage FTP and CHMOD / CHOWN when working with a freelancer?

Nowdays, when working with a freelancer, I add a new user to Debian, create a ftp access to this user and give that to the freelancer Problem is that freelancer can access some data I want to keep ...
0
votes
1answer
42 views

Chmods don't seem to apply

I have a script I periodically run that reapplies FACL and chmod permissions for home directories of gameservers I run. The script first issues a home-directory wide recursive chmod, and then chmods ...
0
votes
1answer
691 views

ubuntu, folder perms, drwxrwx---, php user in group, can't create file

i'm stuck & need help understanding file create permission for members of group. in php, i want to fopen / create a file in a folder that is owned by mysql:mysql (for importing data into mysql) ...
3
votes
2answers
3k views

SaltStack: How to work around “file.recurse doesn't preserve permissions”?

How to work around Recursive directory management doesn't preserve permissions? I want to copy all files in (local) /monitoring/files/etc to /etc on the minion. copy_files_in_etc: file.recurse: ...
-5
votes
1answer
321 views

chmod for all sub directories

There is command that change the folder permission for all subfolders find . -type d -exec chmod 755 {} \; I understand d is for directory and chmod 755 to make all directory as 755 I want to know ...
0
votes
1answer
2k views

Php can't write anything [duplicate]

Just moved my websites to my first vps (centos 7). So i'm very new to linux. Now I have a problem: php cant write anything. Can't make dirs, files, edit them. Php runs as "apache" Things I tried: ...
0
votes
1answer
939 views

Permission denied for user in www-data group

I have a development server running wordpress. The wordpress files are owned by www-data:www-data. I wanted a quick way to be able to upload so I added my user to the www-data group and then did a ...
0
votes
1answer
176 views

WordPress can't install plugin even file permission is correct

I have apache2 server, of course apache2 is running on www-data account. All my WordPress files is own by root:webmaster, and have the g+w permission. Three of the accounts in webmaster group are ...
19
votes
5answers
73k views

chmod not working correctly in Docker

I'm building a Docker image for my Symfony app and I need to give permission to apache server to write into cache and log folders #Dockerfile FROM php:7-apache RUN apt-get update \ && apt-...
0
votes
1answer
714 views

Prevent deletion of folder but let access to everything inside of it

I know there is the +i flag for files and directories, but i have a deeper Problem. Is there a way to prevent a folder from being deleted by an User which should be able to create / access / remove ...
0
votes
1answer
531 views

Why does uploading files via FTP set permissions to 775 / 664 by default?

I'm using FileZilla FTP client, and when I upload new files to the server it's creating directories with 775 permissions and files with 664 by default. Is there a way I can change either the ...
19
votes
1answer
3k views

Which permissions should I set to dhparam.pem?

I am generating Diffie-Hellman parameters for the ssl_dhparam directive in the SSL configuration of nginx. The file dhparam.pem is created with the command openssl dhparam 2048 -check -out dhparam....
5
votes
1answer
33k views

Nginx doesn't have permission to access files with the same ownership

i've just installed nginx on an Archlinux box and encounter this problem: Nginx is configured to run as "nginx", a new user/group that I added, in /etc/nginx/nginx.conf: user nginx nginx; For ...
0
votes
1answer
75 views

Default mode parameters affecting ACL permissions

I have just started working as sysadmin and encountered my first problem. What I am trying to do is set permissions of a directory so that all the subdirectories and files in the directory AND newly ...
1
vote
1answer
1k views

What are the correct Linux permissions inside chroot jail with userspec

I am trying to setup a chroot jail, then I did: which binary ldd /bin/binary Then I did: cp /lib64/{libs} $jail/lib64 cp /usr/lib64/{libs} $jail/usr/lib64 PS: During this setup, I discovered that /...
0
votes
1answer
69 views

Ineffective permissions in Linux containers

When setting up and running a Docker instance, upon boot nginx gives a 403 Forbidden upon accessing static files. In the Dockerfile, I use the COPY command to move all the files to /var/www/app, then ...
22
votes
2answers
1k views

chmod -R makes files in child folders ureadable for some reason

I was adjusting the permissions when setting up some WordPress themes, and ran chmod 664 -R theme-dir/* It worked fine on the files in the root of the directory, but all the files in subdirectories ...
1
vote
1answer
240 views

How to apply different directory and file permissions recursively by one command

Let's assume that I have this folder structure: |-Home |-Subdir |-Subsubdir |-Subdir Each directory includes a bunch of files. Now I want to apply the following permissions: All ...
3
votes
1answer
6k views

chown or chgrp NFSv4 with idmapd error: Invalid argument

I only found 1 or 2 other posting on this, without any solution, so I am creating a new, more specific question for my case. System set up: NFS server running NFSv4. NFS client running RedHat 6, ...
-4
votes
1answer
335 views

SSH broken due to chmod -R /* [duplicate]

I made a total mistake here. Anyway I ran chmod -R 777 /* and immediately regretted my decision. I had to boot into single user mode to and ran chmod -R 755 /etc/* in order to login to the server. ...
0
votes
2answers
1k views

why can't I ssh into my aws ec2 instance? Permission denied (publickey)

I created two ec2 instances, and was able to ssh into the first two fine. After creating the third, I get this error upon trying to ssh into any of them. This is what I'm running: ssh -v -i /Users/...
0
votes
1answer
1k views

Prevent changing ownership of a file

I have file with 777 permission. How can I prevent changing ownership of that file by others? ie I need to prevent chown x:y myfile myfile is actually a log file written from web. it's ownership is ...
0
votes
1answer
628 views

SSH and many other programs are not working after chmod -r 755 /etc [duplicate]

I have a new web-admin and he mistakenly ran chmod -r 755 /etc to try and disallow our shell users from reading any other files. As a result, SSH on our server does not work. How can we fix this?
0
votes
0answers
133 views

Protect web directories from other SSH users but allow apache access?

So my linux box has 2 users : root (which I use) dev (the user that my developer uses) I have a few directories on my web server which I need to restrict access from the "dev" user. So, for example ...
0
votes
3answers
4k views

CHMOD to make directory writable by group not working

I'm trying to make the node_modules directory writable by www-group, but chmod isn't working. vagrant (user) is part of the www-data group as seen with the groups command. Why can't I permit www-...
0
votes
1answer
81 views

Local “incoming” dir

I need to create a directory on a Linux server where users can "submit" files, similar to the incoming directory on an ftp server. (Where they would not be viewable after submission.) Specifically, ...
0
votes
2answers
2k views

Stop file being deleted on NFS mount

I have files stored on an NFS mount which I want to prevent being deleted. The use case is I have a demo version of a web application which uses the same images on every demo - when someone deletes a ...
0
votes
1answer
558 views

Wordpress can't write on file [closed]

I've a problem with permissions/users on my new server. I moved my wordpress blog to a new CentOs server. In this server I've been provided with an ftp user. If I upload a file via FTP with this users,...
0
votes
2answers
108 views

Apache2.4 and Php-cgi : which chmod for log file?

I'm using a Php lib (Monolog) to create my logs. When I delete my log file and access my website in order to generate logs, I see the file created into the good log directory: -rw-r--r-- 1 apache ...
0
votes
1answer
649 views

Correctly assigning permissions & groups

So my nginx is using www-data:www-data, and I want to deploy files to my server with Beanstalk through sftp properly. So I've created an user called beanstalk and added him to www-data group. $ id ...
0
votes
2answers
2k views

/var/mail Folder Permission (Setup Mail Server with Dovecot) [closed]

I am following a guide to setup a mail server and accounts on a Debian 7 OS and they ask to set up a folder permissions to match this: drwxrwsr-x 3 root vmail 4096 Jan 24 21:23 /var/mail But my ...
0
votes
1answer
911 views

Automysqlbackup - dumped files have wrong permissions

This question has been askewd here. But it was not answered. I just got a 3rd server and on all 3 servers I use Automysqlbackup script to create MySQL backups. I do it with cronjob: 52 04 * * * /...

1
2 3 4 5