0

I'm trying to edit a PHP open source project, and I put it in /var/www to view the updates in real time using localhost. It works, but when I try to update one file of the project in Sublime Text I receive the following error:

Unable to save /var/www/howtoelementaryos/global.php Error: unable to create tmp file in /var/www/howtoelementaryos 

I want know what I can do to solve this problem, because I already followed these tutorials:

  1. https://superuser.com/questions/378412/editing-files-in-var-www
  2. Git unable to create file permission denied
  3. https://askubuntu.com/questions/348427/cant-save-files-in-var-www-using-lamp-installed-with-tasksel
  4. fatal: Unable to create temporary file '/home/username/git/myrepo.git/./objects/pack/tmp_pack_XXXXXX': Permission denied

And none of these helped me. Summarizing, what I can do to solve this issue?

Edit:

stat /var/www:

 File: `/var/www' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 806h/2054d Inode: 4202729 Links: 4 Access: (0777/drwxrwxrwx) Uid: ( 33/www-data) Gid: ( 33/www-data) Access: 2013-10-28 10:33:02.827949771 -0200 Modify: 2013-10-28 10:14:39.030751552 -0200 Change: 2013-10-28 10:33:02.827949771 -0200 Birth: - 

stat /var/www/howtoelementaryos:

 File: `/var/www/howtoelementaryos' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 806h/2054d Inode: 4195910 Links: 4 Access: (0775/drwxrwxr-x) Uid: ( 33/www-data) Gid: ( 33/www-data) Access: 2013-10-28 10:33:35.244209685 -0200 Modify: 2013-10-28 10:09:49.724196121 -0200 Change: 2013-10-28 10:33:02.831949803 -0200 Birth: - 
9
  • Could You show an output of stat /var/www, please? And stat /var/www/howtoelementaryos. Commented Oct 28, 2013 at 12:46
  • 1
    u using wamp or xamp? Commented Oct 28, 2013 at 12:47
  • 1
    So, what are your current groups and what are the permissions of /var/www and the subdirectories of it? Commented Oct 28, 2013 at 12:48
  • This probably belongs at Server Fault Commented Oct 28, 2013 at 12:49
  • Okay, updating question. Far I know, I'm using LAMP Commented Oct 28, 2013 at 12:50

1 Answer 1

4

Go to one directory below your project root and do sudo chmod -R 775 proj, where proj is the name of your project root. Enter your password.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.