I solved this by making the webserver user the owner and the group of all the files in the WordPress directory.
I figured out the webserver user was daemon with:
ps aux | egrep '(apache|httpd)'
Then I changed the permissions with:
sudo chown -R daemon:daemon /your-path-to-wordpress
Related Posts:
- Chmod 777 to a folder and all contents [duplicate]
- How to change permissions for a folder and its subfolders/files in one step
- How to change permissions for a folder and its subfolders/files in one step
- cd into directory without having permission
- WordPress can’t find temporary folder, but folder it’s looking at has correct permissions
- WordPress sites being filled with random PHP files
- What permissions should my website files/folders have on a Linux webserver?
- Why is “chmod -R 777 /” destructive?
- Why does sudo command take long to execute?
- What’s wrong with always being root?
- Bash: No such file or directory?
- What’s a .sh file?
- How can I symlink a file in Linux? [closed]
- Kill detached screen session [closed]
- How to get the url of the current svn repo?
- How to unmount a busy device
- How to unmount a busy device
- No space left on device
- How to perform grep operation on all files in a directory?
- Amazon Linux: apt-get: command not found
- Pass a password to ssh in pure bash
- How can I exclude directories from grep -R?
- How to set proxy for wget?
- Docker can’t connect to docker daemon
- Need a good hex editor for Linux
- Pseudo-terminal will not be allocated because stdin is not a terminal
- Directory Inode vs Regular File Inode
- How to cat <
> a file containing code? - Diff command along with Grep gives “Binary file (standard input) matches”
- can’t remove python pip
- How would I get a cron job to run every 30 minutes?
- How to automatically redirect HTTP to HTTPS on Apache servers?
- What is the difference between “#!/usr/bin/env bash” and “#!/usr/bin/bash”?
- Is there a “goto” statement in bash?
- tar: Cowardly refusing to create an empty archive
- Post request with Wget?
- Read and write to binary files in C?
- Telnet [Unable to connect to remote host: Connection refused]
- Terminal Multiplexer for Microsoft Windows – Installers for GNU Screen or tmux
- Is there an alternative sleep function in C to milliseconds?
- Gedit command not working in kali linux terminal
- Syntax error near unexpected token ‘then’
- Curl : connection refused
- How to install Android SDK on Ubuntu?
- C fopen vs open
- How can I use grep to show just filenames on Linux?
- Bash script prints “Command Not Found” on empty lines
- Why does “docker attach” hang?
- Bash export command
- How to edit gitignore file
- Retrieve last 100 lines logs
- What are various options / arguments for “./configure” in Linux
- Adding a new entry to the PATH variable in ZSH
- Delete .DS_STORE files in current folder and all subfolders from command line on Mac
- Why is group ownership with rwx permissions not enough?
- How to configure WP filesystem access in Linux (Ubuntu Server)?
- Can’t upload media to my Raspberry Pi WordPress server
- Definitive wordpress directory ownership and permissions on linux
- My WordPress is giving me an 403 error when saving post/draft with specific words
- Anyone else experiencing high rates of Linux server crashes during a leap second day?
- Can I nohup/screen an already-started process?
- df in linux not showing correct free space after file removal
- In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain?
- Setting the hostname: FQDN or short name?
- Shell command to monitor changes in a file
- When does /tmp get cleared?
- Difference in sites-available vs sites-enabled vs conf.d directories (Nginx)?
- How do I sleep for a millisecond in bash or ksh
- Disk full, du tells different. How to further investigate?
- What does ‘set -e’ do, and why might it be considered dangerous?
- Filename length limits on linux?
- What useful things can one add to one’s .bashrc? [closed]
- How to add a timestamp to bash script log?
- best way to clear all iptables rules
- How to remove empty/blank lines from a file in Unix (including spaces)?
- How can I kill all stopped jobs?
- How to copy file preserving directory path in Linux?
- Postfix – how to retry delivery of mail in queue?
- How can I rename a Unix user?
- How to re-order windows, change the scroll shortcut, and modify the status bar contents in GNU Screen?
- Is it possible to alias a hostname in Linux?
- How do I list loaded Linux module parameter values?
- Does getting disconnected from an SSH session kill your programs?
- Tips for Securing a LAMP Server
- What Linux distribution is the Amazon Linux AMI based on?
- How to prevent a user from login in, but allow “su – user” in Linux?
- What is this IP address: 169.254.169.254?
- Should I install Linux applications in /var or /opt?
- I have a keypair. How do I determine the key length?
- Why drop caches in Linux?
- Heartbleed: how to reliably and portably check the OpenSSL version?
- swap partition vs file for performance?
- How can I fully log all bash scripts actions?
- Best way to disable swap in Linux
- Testing UDP port connectivity
- memcache vs memcached?
- zcat/gzcat works in linux, not on osx. general linux/osx compatibility
- How can I zip/compress a symlink?
- What is the debian-sys-maint MySQL user (and more)?
- How to find the physical volume(s) that hold a logical volume in LVM