From the course: PHP Techniques: Working with Files and Directories

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

File permissions

File permissions - PHP Tutorial

From the course: PHP Techniques: Working with Files and Directories

Start my 1-month free trial

File permissions

- [Instructor] Before we continue learning about how to work with files in PHP, we need to pause for a moment and learn a bit about file permissions. Frankly, file permissions can be a little bit of a hassle, but it's important to understand them so that they don't get in our way. Files and directories belong to a particular user, and the web server is often a different user than the user that owns a file or directory. Permissions on files and directories determine who can have access to them. You cannot read to a file without having file permissions and you also cannot create or delete a file without directory permissions. So if the permissions aren't set right, they can prevent us from reading or writing a file using PHP. Further complicating matters, setting permissions varies by operating system. If you're using Windows via the graphic user interface, you can go to a file, choose Properties, choose the Security tab,…

Contents