Hello, i am not sure if PHP is the best category to post this so sorry in advance. I am following a tutorial for learning PHP in which the instructor develops a Photo Gallery project. In a video instructor set / change / modify the file permission in MAC OS X using command line and makes a note that windows users can use PowerShell to do the same but when i enter the command i receive error. This is what the instructor does: 1. display a list of files in btb_sandbox 2. chown a file. 3. chmod a file. and use posix library which i cant find any where.. so i'll be very very grateful if any of u tell me what the exact command on windows are, i how can do this on windows, I am using Windows 7 I can provide link of tutorial video if needed
ANy help please! i just want to know powershell commands for chagning owner and file permission (0666 / 0777 ) of a file
http://www.youtube.com/watch?v=hYMcbAuFJPk here is the link to the tutorial video plzz inform me if you need any more info
Setting Permission [user@localhost]$ chown theuser thefilemask [user@localhost]$ ls -l rwx-w-r-- 4 php 4096 Nov 7 15:52 mydirectory Modify the permissions in PHP [user@localhost]$ chmod 755 thefilemask Applying the permissions to the file in PHP [user@localhost]$ ls -l -rwx-w-r-- 4 php mygroup 4096 Nov 7 18:52 myfile [user@localhost]$ chmod 524 myfile [user@localhost]$ ls -l -r-x-w-r-- 4 php mygroup 4096 Nov 7 18:60 myfile [user@localhost]$
Standard unix shell commands..... TO THE OP: Windows and unix file permissions are totally different; You almost always dont need to do this on a windows system but if you do it is a lot simpler; attrib will let you change read-only permissions, hidden etc (it can be done in explorer, but im not a windows person im afraid) WINDOWS: http://www.computerhope.com/attribhl.htm HOWEVER: You arent clear what you are doing. Is this a local setup or are you connecting to a remote server? If you are then you can easily change the file permissions through SSH (get putty for windows) using the same commands -OR- FTP (just right click the file, and choose permissions in most cases). If you are still stuck, please provide your exact setup and ill get you the answer.