Get file owner php




















Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 10 years, 1 month ago. Active 2 years, 7 months ago. Viewed 2k times.

Provide a path to file, and get its owner username on Windows? Of course, fileowner is useless here. Any PECL extensions that can help? Edit: Alternative that will also work: Read the summary data from a. DOC file, to retrieve the Author. Edit 2: Found a solution using COM "word. Any others? Mirko Pagliai Mirko Pagliai 1, 1 1 gold badge 17 17 silver badges 34 34 bronze badges. Works as expected. Gordon Gordon k 69 69 gold badges silver badges bronze badges. Jay Lepore Jay Lepore 49 1 1 silver badge 4 4 bronze badges.

Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science.

Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Notes Note : This function will not work on remote files as the file to be examined must be accessible via the server's filesystem. See Also chmod - Changes file mode chgrp - Changes file group. I've only tested this on Solaris 10 so your mileage may vary. There are security concerns doing this as this modification allows any user to change ownership of their files to anyone else.

If you want to chown a symlink, PHP will follow the symlink and change the target file. If you allow sudo execution for chmod by "nobody" www, webdaemon, httpd, whatever user php is running under in this manner, it had better be a system on which the owner is able to be root and no one else can run code, else your whole system is compromised.



0コメント

  • 1000 / 1000