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,522
  • 15
  • 53
  • 96
  • Could You show an output of `stat /var/www`, please? And `stat /var/www/howtoelementaryos`. – Kamiccolo Oct 28 '13 at 12:46
  • 1
    u using wamp or xamp? – R R Oct 28 '13 at 12:47
  • 1
    So, what are your current groups and what are the permissions of `/var/www` and the subdirectories of it? – feeela Oct 28 '13 at 12:48
  • This probably belongs at [Server Fault](http://serverfault.com/) – Boaz Oct 28 '13 at 12:49
  • Okay, updating question. Far I know, I'm using LAMP – Paladini Oct 28 '13 at 12:50
  • You have an error, when you want to save files with Sublime Text, but you are searching for tutorials and tag this question with `git`. Where does `git` come in in your try to save something with Sublime text? – FlyingFoX Oct 28 '13 at 13:34
  • Because this is a project that I cloned with a git. When I posted this question I don't know if the error can be with permissions, git, or both. – Paladini Oct 28 '13 at 13:42
  • So what are your permissions in this directory? You can find out with `ls -l` – FlyingFoX Oct 28 '13 at 13:50
  • Go to one directory below your project root and do sudo chmod -R 775 proj. Enter your password. – wclark Oct 28 '13 at 14:02

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
  • 14,100
  • 15
  • 78
  • 114
wclark
  • 436
  • 4
  • 14