LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-14-2006, 01:23 PM   #1
AKAKAK
Member
 
Registered: Jan 2005
Posts: 64

Rep: Reputation: 15
write to var/www isn't possible, i want to write that area


i know i must use chmod but which one and what the struck of the code line to area and not file? "chmod mode file(s)"
 
Old 01-14-2006, 04:20 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
which one? chmod is a core utility - you shouldn't have more than one on your system.

what the struck? - don't even know what you're asking there.

I'd be very leery of changin permissions (modes) of /var and /www - the former is used by key system files that might not work if you changed their permissions due to security safeguards and the former is used for your web server usually.

Typing "man chmod" or "info chmod" should give you a lot of info about use of the chmod command.

Breifly:

You can set permissions in the form read/write/execute by numeric values with 4 = read, 2 = write and 1 = execute. The permissions are set for each of owner, group and world (world being everyone else).

To set permissions for everyon to read, write and execute you do
4+2+1, 4+2+1, 4+2+1 = mode 777:

chmod 777 file(s).

If you only wanted to give read, write and execute to the owner but read to group and world you do: 4+2+1, 4, 4 = mode 744:

chmod 744 file(s)

If you wanted to give read and execute to owner and group but not world you do: 4+1, 4+1, 0 = mode 550:

chmod 550 file(s).

You can see current permissions of a file by doing:
ls -l file(s).

The left most columnt contains the permissions as r(ead), w(rite) and e(x)ecute prepended by a special character.

So a file that has 777 would show:
-rwxrwxrwx

A file that has 744 would show:
-rwxr--r--

A file that as 550 would show:
-r-xr-x---

The first position has special meanings with the most common being:
- = Regular file
d = Directory
l = Symbolic link
c = Character device file
b = Block device file

But if you really don't know the above already I'd strongly urge you not to change mode (by the way chmod is a contraction of change mode) of anything in /var at least. You should restrict your experimentation to your home directory as you're apt to break something until you've done more reading.
 
Old 01-14-2006, 06:34 PM   #3
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775

Rep: Reputation: 86
Quote:
Originally Posted by AKAKAK
i know i must use chmod but which one and what the struck of the code line to area and not file? "chmod mode file(s)"
This is what I would advise instead of chmod...

Create a directory in your /home directory where your webpages and such get stored. Then navigate to that directory in Nautilus. Let's say, for example, that the folder is /home/akakak/web

Then, press Alt-F2 and type
Code:
gksudo nautilus
Enter your sudo password and navigate to /var/www

So now you have two windows open--one with root privileges, one with user privileges. Middle-click-drag /home/akakak/web to /var/www and then select link here.

Now whatever you put in /home/akakak/web will be in /var/www.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How does minicom write to /var/lock Wim Sturkenboom Linux - General 2 10-26-2005 03:28 AM
cannot read/write to /var/www eddi Linux - Newbie 1 02-04-2004 03:08 PM
Can't write to /var/run/console cpeppler Linux - General 2 10-03-2003 07:28 AM
Does Linux write what happens at boot to a file ? I can't find anything in var/log . lostboy Linux - General 8 05-07-2003 02:58 PM
cannot write PID to var/run/news cruella Linux - Newbie 1 01-22-2002 06:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration