Skip to content
Menu
Marius Serbanica – Tech Blog
  • My Tech Blog
  • About me
  • Contact Me
  • Curriculum Vitae
  • Projects
  • Current Projects List
  • Certifications
  • Home Lab
  • Self-Hosted
  • Linux Cheat Sheet
  • Linux Commands
  • Privacy Policy
  • Site Map
Marius Serbanica – Tech Blog
June 1, 2023

Getting permission – “I am ROOT!”

If you’re getting a “permission denied” error when trying to edit or upload files through WinSCP or FileZilla in the /var/www/html directory on your Linux web server, it indicates that the user you’re logged in as does not have the necessary permissions to modify those files. Here are a few steps you can take to resolve this issue:

First, you must check Ownership: Verify the ownership and permissions of the /var/www/html directory and its contents. Open a terminal and run the following command:

ls -l /var/www/html

This will display a list of files and directories in the /var/www/html directory along with their ownership and permissions. Ensure that the user you’re logged in as has write permissions (e.g., rwx) for the files and directories you want to modify.

If the ownership and permissions are incorrect, you can change them by running the following command:

sudo chown -R your_username: /var/www/html

Replace your_username with your actual username. The -R option ensures that ownership is recursively applied to all files and directories within /var/www/html.

Next, check Group Permissions: Additionally, you can check if the group ownership and permissions of the /var/www/html directory are appropriate. Run the following command:

ls -l /var/www/html

Ensure that the group ownership of the files and directories is set to a group that your user account belongs to. If necessary, you can change the group ownership using the chown command:

sudo chown -R your_username:your_groupname /var/www/html

Replace your_username with your actual username and your_groupname with the appropriate group.

Eureka! You are now, indeed – ROOT! 🙂

Share on Social Media
x facebook linkedin

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Join my LinkedIn Network.

Recent Posts

  • Kubernetes cluster. Why and how
  • Installing GNU-World on ircu2
  • Replacing Cloudflare Tunnel with Tailscale on a VPS
  • KASM – My main workspace RBI
  • Transforming a Mini PC into a Powerful Home Network Hub / Router/ Firewall with OPNsense

Archives

  • February 2025
  • January 2025
  • October 2024
  • May 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023

Categories

  • How-To
  • Tech Industry
  • Tech, but personal
  • Tutorials

Recent Comments

  1. IRC Lamer on Installing GNU-World on ircu2
  2. severus2231 on Transforming a Mini PC into a Powerful Home Network Hub / Router/ Firewall with OPNsense
  3. admin on Mounting a NAS (Network Attached Storage) device on Linux
  4. abL on Mounting a NAS (Network Attached Storage) device on Linux
  5. Alin R on Cleaning up your Linux OS.
Social Media
Find me on social media
Facebook Twitter Instagram LinkedIn

©2025 Marius Serbanica – Tech Blog