Questions tagged [chmod]
A Unix tool for changing file permissions
247
questions
0
votes
2
answers
41
views
Efficiently removing x-bit from files in large directory
I have a directory /some/dir containing millions of files and directories. I need to remove the X-bit for all file, but not from the directories.
The following works:
find /some/dir -type f -chmod -x {...
1
vote
0
answers
17
views
permissions and rights on a shared drive
I don't understand exactly how things work and how to solve the following correctly.
I have a mounted HD to my server, to this I upload and download photos from domain X. This works perfectly. Domain ...
1
vote
0
answers
1k
views
What are the proper permissions and ownership (including wp-config.php and .htaccess) for Wordpress installations on a LEMP server
I am running an Ubuntu based Linux/Nginx/MariaDB/PHP (LEMP), server with my Wordpress installation in the root account at /var/www/example.com/. My Wordpress is running as the www-data user, and Nginx ...
0
votes
1
answer
181
views
User unable to access files in a folder with SUID S bit set
I have a folder which I want to share with users of a group named frx. I had applied chmod g+s to the folder, but for some reason the SUID bit (for folders in the /home/frx directory) came out as S ...
7
votes
2
answers
16k
views
Why would chmod give "No such file or directory" when running recursively?
I can change the permissions of the file directly:
# chmod --changes --recursive ug+rwX /var/www/shared/tmp/cache/assets/BA0/280/sprockets%2F286302903364106648b609d708884f78
and I can also ...
0
votes
1
answer
130
views
set the permissions on all the files and folders within a directory (CentOS 7.0 )
I kind of new to Linux/Centos world, is there any way to set the permissions on all the files and folders within a directory. I know chmod 777 will set permissions on the directory, but if it already ...
0
votes
1
answer
3k
views
apache user directory access permission denied
I've run chmod 777 on /home/cache/, however the apache user is still unable to write to it. My php script is writing to this directory but got a permission denied error and don't know why.
ls -ld ...
1
vote
1
answer
2k
views
Cannot access directory via SFTP - "locked"-Flag
I'am trying to access a remote Directory via SFTP.
ls in the parent dir says that where the d for directory should be, there is an l. Manpage of chmod says something about "mandatory locking", but ...
17
votes
5
answers
14k
views
CHMOD - Applying Different Permissions For Files vs. Directories
I've been trying to clean up permissions on a few boxes and have been scouring the chmod man as well as all the internet documentation that I an handle without any luck -- so here we go.
Basically, I'...
0
votes
1
answer
248
views
Webserver and permissions - two users having rights to modify specific (but not all) files
So,the typical situation is like that: webserver (in this case nginx) works under the www-data user.
And then there is also 'konrad' user, which is just an ordinary user.
And now, the whole website (/...
0
votes
0
answers
561
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 ...
0
votes
2
answers
180
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/...
12
votes
9
answers
159k
views
Is there a way to run chmod on Windows
Is there a way to run the chmod command on Windows?
0
votes
2
answers
294
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 ...
1
vote
1
answer
3k
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 ...
1
vote
1
answer
508
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?
1
vote
1
answer
689
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....
1
vote
0
answers
141
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 ...
1
vote
2
answers
7k
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-...
11
votes
2
answers
81k
views
Using chown to change the group owner of a directory is not permitted....Why?
I am trying to execute chown on a directory that has the following permissions and owners:
drwxrwxr-x 2 justin devs 4096 Jan 1 20:42 test
I am trying to simply execute the following as the justin ...
1
vote
1
answer
2k
views
Permissions to use for Wordpress on Ubuntu with Webmin
What are the best permissions for a Wordpess install on Ubuntu managed by Webmin? Currently, root owns all the files and all of the files are also set to the root group. I'm using the virtual server ...
1
vote
2
answers
2k
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 ...
2
votes
1
answer
10k
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
...
0
votes
1
answer
475
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 ...
16
votes
4
answers
14k
views
How do I copy ACLs on Mac OS X?
Most unix derivates can copy ACLs from one file to another with:
getfacl filename1 | setfacl -f - filename2
Unfortunately Mac OS X does not have the getfacl and setfacl commands, as they have rolled ...
0
votes
0
answers
304
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/
$...
8
votes
3
answers
34k
views
Change all file permissions to 644 and all folder permissions to 755 recursively
How to change all file permissions to 644 and all folder permissions to 755 recursively using chmod in the following two situation:
If they had 777 permissions
Regardless of the permission (with ANY ...
0
votes
2
answers
1k
views
How can i protect my php files on a server (chmod ?)
I have a dedicated server, on this server i have two vhosts. and i will give the access of the server to two people. In my php file there's the database password and i don't want to share that with ...
1
vote
1
answer
2k
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 ...
0
votes
1
answer
2k
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 ...
1
vote
2
answers
169
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 ...
7
votes
2
answers
12k
views
Still confused by Permissions - linux, nginx, php-fpm
I have read the canonical answer at What permissions should my website files/folders have on a Linux webserver?
However I'm still stuck. My setup is:
A developer user 'ade' who owns the directories ...
16
votes
5
answers
69k
views
vsFTPd default uploaded file permissions on Ubuntu not working
I have a Server running Ubuntu 12.10 x64, and the last version of vsFTPd.
My user example.com has its home folder set on /var/www/example.com,
I created a public_html folder inside and gave 777 ...
0
votes
2
answers
358
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
0
answers
31
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
1
answer
826
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
1
answer
505
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 ...
3
votes
2
answers
22k
views
How to set permissions for a CIFS mount with autofs?
I've set up a CIFS mount on my CentOS 6.4 server with autofs :
File /etc/auto.mnt :
Photos -fstype=cifs,perm,rw,uid=505,forceuid,gid=505,forcegid,file_mode=0770,dir_mode=0770,credentials=/root/...
0
votes
1
answer
78
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 ...
76
votes
7
answers
148k
views
How to setup linux permissions for the WWW folder?
Updated Summary
The /var/www directory is owned by root:root which means that no one can use it and it's entirely useless. Since we all want a web server that actually works (and no-one should be ...
0
votes
1
answer
1k
views
How to add write permissions to php/apache? [duplicate]
I've got the following scenario:
There's a folder named "uploads". It's owned by "root" and it's group is "webmasters". Permissions are set to 755.
drwxrwsr-x 2 root webmasters 4096 Mar 20 22:49 ...
-2
votes
1
answer
2k
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
0
answers
1k
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 ...
30
votes
5
answers
179k
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
1
answer
2k
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
1
answer
3k
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 ...
3
votes
1
answer
9k
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, ...
0
votes
0
answers
74
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
1
answer
673
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
0
answers
404
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/...