Uridium Posted December 2, 2024 Posted December 2, 2024 (edited) Im working on a CGI script but i need to change file permissions to chmod 777 on xmapp public_html folder can this be done and if so how ive searched google they seem very confusing Thank ya kindly Edited December 2, 2024 by Uridium Quote
Magictallguy Posted December 2, 2024 Posted December 2, 2024 Answering the question Assuming you're on Windows here. XAMPP uses local files on your PC, so you'd be changing permissions of files and folders on your local system - which gives you 2 options. Personally, I prefer the shell method. Run PowerShell, change directory to the one above the one you're attempting to alter (example; if you were trying to change the permissions of C:\xampp\htdocs\some-folder, you'd cd to C:\xampp\htdocs) Then run the chmod command chmod 0777 some-folder replacing "some-folder" with, in your case, "public_html" - The other method is to use Windows file/folder properties, altering the permissions in [directory] -> Properties -> Security -> Permissions Why we don't do this Granting read/write/execute to the entire webroot is a massive security hole. Upload and execute anything, brilliant! Goodbye, hard work. Consider moving whatever needs to write to the webroot into a subfolder and simply making that 0766 instead (owner can read/write/execute, anyone else can r/w), or even the standard 0755 (owner r/w/x, everyone else r/x but not write) Quote
Uridium Posted December 2, 2024 Author Posted December 2, 2024 That didnt seem to work unless i did the second part wrong ive managed to find a solution right click htdocs/ folder you want to CHMOD on (windows) go to security and you can give yourself (nobody else) read and write permissions Quote
rockwood Posted December 5, 2024 Posted December 5, 2024 20 hours ago, Magictallguy said: I said PowerShell, not CMD 😉 On 12/3/2024 at 3:21 AM, Uridium said: That didnt seem to work unless i did the second part wrong ive managed to find a solution right click htdocs/ folder you want to CHMOD on (windows) go to security and you can give yourself (nobody else) read and write permissions The "chmod" command does not work in a standard Windows CMD because it is a Unix command, not native to Windows; to use "chmod" on Windows, you need to either use a Unix-like environment like Cygwin or the Windows Subsystem for Linux (WSL) to access its functionality. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.