简体   繁体   中英

I'm using Zend Studio for Eclipse and I'm trying to save my file but it failed!

I'm new to PHP development and I just used Zend yesterday. One problem I'm having is saving the file in a directory that is read-only.

I'm using Zend studio to develop PHP scripts. I have XAMPP installed in my Ubuntu in /opt/lampp/ directory.

Now the /opt/lampp/htdocs directory requires privilege access. I can't save anything there. It requires me to sudo everything. I know this is for security reason.

Now, I can just sudo gedit index.php inside the opt/lampp/htdocs/project directory and save the file there. But I want to use my Zend Studio to develop scripts.

When I opened the file inside /opt/lampp/htdocs/project/index.php inside Zend. I can't save it there. The save could not be completed because parent of resource is marked as read-only

Now I dont want to modify the directory to be read/write, I just want to use Zend Studio and allow zend to save files inside the directory.. Please guide me!

Okay, short of running Zend itself under sudo, I'm not sure you're going to be able to do that.

You're asking how to be able to write to a write-protected directory. The answer is "Don't try".

You'll either have to unprotect it or figure out a way to have Zend make a copy of the file in an unprotected area for editing, then copy it back (under sudo) when you close it.

I know which option I'd choose (I'm inherently lazy).

在保存到/ opt / lampp / htdocs /所需的特权下运行Zend Studio。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM