These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for allow file locking on the new forum.
hello,
can someone explain me how can we enable "file locking" in Virtualmin on CentOS 6. I have a web script that needs to lock some .htaccess files for some security reasons, but the script is not able to lock the files since "file locking is not enabled on the server" this is the message i have seen in the log..
Any idea ?
Amel
Hi,
Are you simply trying to make it impossible/difficult to update the file?
Best Regards,
Peter Knowles
TPN Solutions
E: pknowles@tpnsolutions.com
P: 604-782-9342
W: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Hi Peter,
thank You for quick response !
Yes I have a script that has to be able to lock the .htaccess file so no other scripts can make the changes.
Amel
Amel,
Just a thought, what about simply changing the permissions on the file? That would only allow the owner of the file to change them back. So basically, a file by default is generally given
644
permissions, and by changing these permissions to say444
or lower would make the file writeable, but still readable.Best Regards,
Peter Knowles
TPN Solutions
E: pknowles@tpnsolutions.com
P: 604-782-9342
W: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
well the scenario is as follows:
My Server is configured to automatically generate a 403 Error if my root .htaccess file permissions are NOT what the Server allows (probably the Server is currently only allowing 644 permission). I need to configure the Server to allow 404 permissions for .htaccess files. but I am not sure where to change these settings...
Amel