Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [chmod]

A Unix tool for changing file permissions

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

How to preserve file access time when using `chmod`

I would like to know how can I preserve file access time ("atime") when using "chmod". Sometimes I need to use the code below: chmod -R 777 /directory It works fine, however all ...
user avatar
0 votes
0 answers
81 views

vsftpd : permission denied

Running on debian10 My website : /home/mysite.com drwxr-xr-x 16 www-data www-data I added a new user with adduser alex Content of /etc/vsftpd.conf nano /etc/vsftpd.conf listen=YES listen_ipv6=NO ...
user avatar
  • 797
0 votes
0 answers
89 views

cannot connect to gcp instance Remote side unexpectedly closed network connection

when trying to connect to gcp VM instance via ssh key the error that i am getting is Connection closing...Socket close. Connection closed by foreign host. Disconnected from remote host(akr@34.125.177....
user avatar
0 votes
2 answers
55 views

Permissions Numbers Linux

Going through with permissions and understanding permissions, I understand thats the 3 is not part of the owner, group, other. I also know that 7 is the highest permission for those three sets, what ...
user avatar
  • 3
1 vote
1 answer
144 views

home/username directory chmod 750 best for security but are some errors

in directory /home/username/public_html I have a website with CMS. When I change chmod of /home/username directory to 750, my site doesn't work. I believe my CMS have no access to it. Is there any way ...
user avatar
1 vote
1 answer
200 views

Should both root and wheel users own the files that originally were only owned by root?

Should a wheel user that was created to disable root login and secure SSH have the same ownership as root from a security point of view?
user avatar
1 vote
1 answer
103 views

NFSV4 w/CHMOD & CHGRP

I'm just starting off with NFSV4 and had a few questions. So normally when creating an NFS share on a NAS filer and mounting on a client I would run a chmod & chgrp to set things up the way I want....
user avatar
1 vote
0 answers
37 views

Noexec vs chmod -R -x for malware interogation?

I am setting up a Linux box to examine malware samples. I wanted to create a directory where I could safely unzip each sample and run very basic triage commands against the file to collect ...
user avatar
  • 237
2 votes
1 answer
1k views

change permission of mounted folder in linux

i mounted a folder from windows to Linux's like so in windows end the permission is set to everyone and on my linux end i did this # mount -t cifs -o username=sprite//173.11.111.99/win-share /mnt ...
user avatar
  • 123
0 votes
1 answer
138 views

How to change folder permission using FileZilla Client on Windows for Filezilla Server on Windows Server?

I have tried many things including using Cygwin with a domain user because Windows Server cannot use CHMOD which FileZilla tries, but nothing worked sadly. I am open to using a different FTP Client if ...
user avatar
0 votes
0 answers
21 views

How can i find files and directories with incorrect permissions(perm that i don't not want) and then change only those

I am sure there is an easy way of doing this either with a script or possibly with a one-liner, which would be great. basically, i want directories to be changed to 775 only if perm doesn't currently ...
user avatar
  • 1
0 votes
0 answers
65 views

chmod or cd to a directory is not working

I have a file in a directory with root root permissions. But even with root user I am not able to change the permission or cd to that directory, even not able to change the permissions. $ lsattr AWS/ $...
user avatar
  • 13
1 vote
2 answers
2k views

rsync: [generator] failed to set permissions : Operation not supported (95)

I want to virtualize correctly Android 10 on top of my Jetson nano (arm64) using qemu and kvm on ubuntu 18.04. This is the tutorial that I'm following : https://github.com/antmicro/kvm-aosp-jetson-...
user avatar
  • 143
0 votes
2 answers
96 views

Protecting sites contained in the same Apache directory

I've set up all of my sites in different /var/www subdirectories. Let's say I have 5 sites based in a CMS like WordPress in /var/www/a.com, /var/www/b.com, /var/www/c.com, /var/www/d.com and /var/www/...
user avatar
0 votes
1 answer
213 views

Security-wise file ownership & permission setup for LEMP server to be managed via wp-cli and wordpress dashboard?

I'm on a LEMP VPS with the following setup; cd /home/$USER/public/myDomain.com # change directory to myDomain.com chown -R nginx:nginx . # change file ownership find . -type ...
user avatar
  • 1
1 vote
2 answers
690 views

screen inside systemd daemon on CentOS 8

So I want to run screen inside a systemd service so that I can give the process (inside the daemon) commands while it is running. See at the end of the question for examples of what I want be be able ...
user avatar
  • 11
1 vote
2 answers
98 views

chmod issue - Incorrect Command Issued

From this linked post (answered by @dmourati): How can I make a user and give read only access? On a CentOS box When attempting to create a readonly account, the command chmod -R o+rx / was executed ...
user avatar
0 votes
1 answer
823 views

Different permissions for guest and non-guest users in Samba

I am configuring a samba server for file sharing. I was wondering if there is a configuration setting to map different file or directory masks to different users. I am attempting to allow admin users ...
user avatar
0 votes
2 answers
112 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/ /...
user avatar
  • 103
0 votes
0 answers
24 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 ...
user avatar
  • 1
0 votes
1 answer
184 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 ...
user avatar
  • 103
0 votes
1 answer
341 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 ...
user avatar
0 votes
0 answers
1k 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 ...
user avatar
  • 1
0 votes
1 answer
75 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 ...
user avatar
-2 votes
1 answer
903 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 ...
user avatar
0 votes
0 answers
592 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 ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
  • 105
3 votes
1 answer
2k 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 ...
user avatar
0 votes
0 answers
72 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. ...
user avatar
-3 votes
1 answer
480 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 ...
user avatar
0 votes
0 answers
277 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/...
user avatar
  • 99
3 votes
2 answers
117 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 ...
user avatar
1 vote
0 answers
201 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:...
user avatar
2 votes
1 answer
4k 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 ...
user avatar
1 vote
1 answer
203 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 ...
user avatar
  • 123
0 votes
2 answers
660 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 ...
user avatar
  • 797
0 votes
1 answer
52 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 ...
user avatar
  • 11
0 votes
1 answer
836 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) ...
user avatar
3 votes
2 answers
4k 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: ...
user avatar
  • 2,914
-5 votes
1 answer
458 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 ...
user avatar
  • 113
0 votes
1 answer
3k 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: ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
  • 193
0 votes
1 answer
186 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 ...
user avatar
  • 143
29 votes
5 answers
135k 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-...
user avatar
  • 393
2 votes
1 answer
1k 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 ...
user avatar
  • 133
0 votes
1 answer
891 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 ...
user avatar
  • 117
28 votes
1 answer
5k 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....
user avatar
7 votes
1 answer
42k 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 ...
user avatar
  • 1,035
0 votes
1 answer
106 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 ...
user avatar
1 vote
1 answer
2k 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 /...
user avatar

1
2 3 4 5