Results 1 to 4 of 4

Thread: read/write priveleges to eclipse, gPHPEdit, etc

  1. #1
    Join Date
    Jul 2008
    Location
    Portugal/Lisboa
    Beans
    2
    Distro
    Ubuntu 8.04 Hardy Heron

    Question read/write priveleges to eclipse, gPHPEdit, etc

    hello everyone

    I'm having trouble understanding how can i use php editors like eclipse or gPHPEdit, if when i try to save a .php file with one of them, i always have a message saying i don't have enough privileges. like many pelople on this forum, id like to edit the files directly, like in windows. so far i found, these solutions:

    1 - "sudo gedit index.html", edits the file with gedit. don't realy like it, because i'd like to use one of those editors.

    2 - "sudo chmod 777 /var/www", makes the www folder writable, by all users. probably not very safe.

    3 - the least practical solution is to edit the file on the desktop, and "sudo cp file.php /var/www" afterwards. my save / test cycles are too frequent for this to be practical

    i think the solution is probably in giving those applications read/write priveleges to those folders. but how? is there a plugin or a config file on any of them?

    thanks for any answer. I'll keep looking for one too

    btw, i use Ubuntu 8.04.1, with PHP Version 5.2.4-2. i have no trouble running the files in "http://localhost"
    Last edited by lsag; July 27th, 2008 at 01:49 AM. Reason: 1 more solution found

  2. #2
    Join Date
    Jan 2008
    Location
    Auckland, New Zealand
    Beans
    3,136
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: read/write priveleges to eclipse, gPHPEdit, etc

    You can't give an application privileges to edit files, only users and groups. You should be able to use "gksudo eclipse file_name" to edit the file.

    I have apache + php installed for testing and the way I have it set up I just create symbolic links in /var/www to somewhere in my home directory where I have write privileges for each project.

    If /var/www is owned by www-data you could also add yourself to the www-data group and make sure all the directories have group write privileges so that you can edit anything.

  3. #3
    Join Date
    Jul 2008
    Location
    Portugal/Lisboa
    Beans
    2
    Distro
    Ubuntu 8.04 Hardy Heron

    Talking Re: read/write priveleges to eclipse, gPHPEdit, etc

    i think i know how u did it:

    make the alias:
    ln -s /var/www/ /home/user_name/Documents/


    change the permisions on the alias, because they also have been cloned:
    sudo chmod 777 www

    many thanks!!

  4. #4
    Join Date
    Jan 2008
    Location
    Auckland, New Zealand
    Beans
    3,136
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: read/write priveleges to eclipse, gPHPEdit, etc

    Yeah that's sort of what I did. I kept /var/www how it was but did something like "mkdir /home/user/web/project1" "sudo ln -s /home/user/web/project1 /var/www/project1"

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •