Tag Archives: Ubuntu

How to Set File Permissions for WordPress on Ubuntu

Motivation:

  • You have a WordPress instance on Ubuntu Nginx.
  • You want to ensure that only the Nginx process can access WordPress files.

Procedure:

  1. View current file owner and group:
ls -l /var/html

The root folder should be owned by www-data user. www-data is the user that web servers like Apache and Nginx on Ubuntu use by default for their normal operation.

2. Change file owner and group to www-data if necessary:

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

3. Set minimum permissions for folders:

cd /var/html
sudo find . -type d -exec chmod 755 {} \; # directory permissions rwxr-xr-x

4. Set minimum permissions for files:

cd /var/html
sudo find . -type f -exec chmod 644 {} \; # file permissions rw-r--r--

5. Verify the changes:

ls -l /var/html

Topic 1 – Operating Systems

Why do I need to learn about operating systems?

Because you will develop your software using an operating system or for an operating system.

What can I do after finishing learning operating systems?

You will be prepared with skills that help you prepare environments for your your programming journey.

You will be prepared with the concepts that help you understand programming terminologies.

You will be inspired to learn programming to solve problems.

How many operating systems should I know?

As many as possible. We recommend that you learn how to work with Windows first. Then you can learn the core concepts of any operating system.

How do I learn to use operating systems?

Please read this book to learn how to use Windos 10: Andy Rathbone (2015). Windows 10 For Dummies. John Wiley & Sons.

Aternatively, please read the books below to learn how to use Windows 11:

How about other operating systems such as macOS, Linux or Unix?

If you have a Mac then you can read this book to learn how to use macOS: Pogue David (2019). macOS Mojave: The Missing Manual. O’Reilly Media.

If you have a PC with Ubuntu, or Linux, or Unix then you can read this book to learn how to use a Unix-based operating system: Mark G. Sobell (2015). A Practical Guide to Ubuntu Linux. Prentice Hall.

After that, please read these lecture notes and try the code to grasp the core concepts of computing: Introduction to Computing Principles.

After that, please read this book to learn the core concepts of an operating system: Abraham Silberschatz et al. (2018). Operating System Concepts. Wiley.

Terminology Review:

  • Central Processing Unit (CPU).
  • Random-Access Memory (RAM).
  • Hard Disk Drive (HDD).
  • Solid-State Drive (SSD).
  • Programs: How does a program start and run?
  • Boot Loaders.
  • Basic Input/Output System (BIOS)
  • Unified Extensible Firmware Interface (UEFI).
  • Computers: The interplay of CPU, RAM and Devices.
  • Interrupts.
  • ∞×∞
  • Operating System (OS).
  • Monolithic Structure.
  • Microkernels.
  • User Mode.
  • System Calls.
  • Kernel.
  • Kernel Mode.
  • Processes.
  • Threads.
  • Process Synchronization.
  • Memory Management Unit.
  • Logical Address.
  • Physical Address.
  • Paging.
  • File System.
  • Security and Protection.
  • Networks.
  • Virtual Memory.
  • Virtualization.
  • Virtual Machines.

Once you finish learning about operating systems, please click on Topic 2 – Introduction to Computer Networks to continue.