I have chmod() disabled on my server, but I still want users to be able to create read-only files via PHP, is there a way to do so?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t, since it’s impossible to put anything in a read-only file…
EDIT actually, there is a way:
The
umaskmanipulation allows you to create a read/write file descriptor, even though the underlying directory entry is read-only.