Page 1 of 1

cannot write a file on htdocs

PostPosted: 08. February 2010 19:37
by odisseo83
Hi everybody, I just installed xampp but I cannot save files on htdocs directory. what should I do?

thank you in advance

Re: cannot write a file on htdocs

PostPosted: 12. February 2010 09:00
by merlin38
You probably use sudo to install xampp.
So the owner of files is ROOT

To see the
use terminal
cd /opt
ls -l
You will see that the owner of lampp is root
Other users don't have rights to write in the folder

Use a terminal launched in root mode
Ubuntu: alt+f2 type: gksudo gnome-terminal
cd /opt/lampp/
You have to choose
-setting the rights for read r , write w , and execute x, to yes for the owner, the owner group, and entire world
it is wrx 111 111 111 in binary, and 777 in octal.
sudo chmod -R /opt/lampp/htdocs 777 (-R is for doing this Recursively for each file and folder within htdocs)
-change the owner and owner group
sudo chown -R nobody:users /opt/lampp/htdocs (between owner and owner group you might have or not :. On ubuntu you have to type it)
Then add your cession_identifier to the group "users" with the appropriate command (i use graphical interface for that, not command-line)

Be careful, don't use xampp as a web server listening to the web. Use a firewall.

Re: cannot write a file on htdocs

PostPosted: 16. February 2010 07:12
by odisseo83
odisseo83 wrote:-change the owner and owner group
sudo chown -R nobody:users /opt/lampp/htdocs (between owner and owner group you might have or not :. On ubuntu you have to type it)
Then add your cession_identifier to the group "users" with the appropriate command (i use graphical interface for that, not command-line)
i tried how you say but I'm a newbie, I did not understood how to add my cession identifier to the group users. could you be more detailed or show me pictures?

odisseo83 wrote:setting the rights for read r , write w , and execute x, to yes for the owner, the owner group, and entire world
it is wrx 111 111 111 in binary, and 777 in octal.
sudo chmod -R /opt/lampp/htdocs 777 (-R is for doing this Recursively for each file and folder within htdocs)

I tried but it does not work. better: the first time it worked, but the other ones it did not