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: -
Community
  • 1
  • 1
Paladini
  • 4,422
  • 14
  • 49
  • 96

1 Answers1

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.

Ztyx
  • 12,720
  • 14
  • 75
  • 110
wclark
  • 436
  • 4
  • 14