How can I CHMOD files/directories on Windows Azure?

你离开我真会死。 提交于 2019-12-23 21:05:49

问题


I am using FileZilla FTP to right click and change a directories File Permissions as I do on many other sites/servers. For some reason this is not working in Windows Azure. It outputs in FileZilla "500 'SITE CHMOD 777 (mydirectory)': command not understood"

Any ideas?


回答1:


I found a hack solution to delete files on Azure:

  1. Stop your website from the management console (https://manage.windowsazure.com)
  2. Open up the FTP site in Filezilla
  3. Rename the directory that has the problem to anything else (Possibly an optional step, I dont know)
  4. Delete the renamed directory
  5. Restart your website.

That seems to do it.




回答2:


The Windows Azure portal has a "Console" for websites where you can execute some shell commands. One of them appears to be chmod (fileutils) 4.1. I was able to modify the permissions on a folder using this:

chmod -R 744 myfolder



回答3:


Windows Azure Websites is a Windows Server based server. Thus, file permissions don't work like in Linux (as @SLaks already mentioned).

However, the account your scripts (PHP/ASP.NET/node.js) are executed under has full access to the folder /site/wwwroot, as does your FTP user. Meaning that from your PHP you can do all fully privileged file access operations - Read, Write, Delete, Create, Create directories. What you cannot do, and cannot be changed, is to execute scripts (which 0777 would give you in Linux).



来源:https://stackoverflow.com/questions/16040814/how-can-i-chmod-files-directories-on-windows-azure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!