• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Ubuntu and apache ...index.html

 
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok i installed php5 and apache2 with the following:

sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install apache2-mod-php5


but when i go into my var/www directory when i try to edit my
index.html file, its says its readonly, and can't be modified.


how can i fix this?

Thanks,
Justin Fox
 
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You must first alter the privileges over the file.

First, you must know what is the password of the root account. If you do not know the password of the root account you can change it with

$ passwd root

And after resetting a new password, you can invoke the chmod command to grant yourself privileges over the file.

$ chmod a+rw index.html

Hope that helps!
[ October 25, 2007: Message edited by: Edwin Dalorzo ]
 
Saloon Keeper
Posts: 28319
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unix - including Linux and Solaris - is a fairly secure OS. In the stock Linux distros, Apache runs as a special user - usually it's something like "apache".

So if you do an 'ls -l /var/www/index.html', you'll see who owns it and what rights are available.

For maximum security, it's best to either do editing either under the account of the apache user or as a member of the apache group (assuming that the pages are group-writable). If you open it up to everyone (chmod 777), then there's a chance that someday someone may come in and do Bad Things.
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the replies, the logging in under root will probably help.
I didnt know the password, or know how to get/change it, but now I do.

Thanks,

Justin
 
Pay attention! Tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic