Jump to content

Recommended Posts

Hi,

 

I've looked through some of the archives in regard to umask, and I still have some very important security questions that I'm hoping someone can advise me on.

 

My host has a default umask(022) set, which causes problems for me in regard to file deleting and editing. Even if I use FileZilla to change the permissions, they remain as 644. I am wondering what the most secure approach is — I currently don't have a user log in to access the file creation part of the site, it's currently just a directory that I've told a few friends about, my next project is to require users to log in. My host suggests setting umask(000), and then set the file permissions to 666 in mkdir(), but I'm wondering if that opens a "Pandora's box".

 

If someone can suggest a secure approach (other than the logical "require users to log in", that's coming soon), that would be great. I want full control to read and write, and I want my PHP code to be able to do that work automatically. As it stands, even if I attempt to change the permissions in FileZilla, it doesn't let me do it, and I can't delete the file.

 

Any help would be appreciated.

Link to comment
https://forums.phpfreaks.com/topic/110541-umask-and-file-permissions/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.