LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-26-2007, 04:07 AM   #1
Raakh
Member
 
Registered: May 2007
Posts: 128

Rep: Reputation: 15
setting permissions


there is a user gws on my server and I want to give him rights to upload the file in /var/www/vhosts/servername/httpdocs

Thanks & best regards
 
Old 12-26-2007, 05:07 AM   #2
ingerul9
Member
 
Registered: Jan 2007
Posts: 35

Rep: Reputation: 15
Try the man page for chown or chmod. With chown you can change ownership of the file and with chmod you can set the permissions for the file.
 
Old 12-26-2007, 05:09 AM   #3
Raakh
Member
 
Registered: May 2007
Posts: 128

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ingerul9 View Post
Try the man page for chown or chmod. With chown you can change ownership of the file and with chmod you can set the permissions for the file.
Can you please write any example

thanks & best regards
 
Old 12-26-2007, 12:43 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
What are the current ownerships & permissions on the directory, who's
the owner of the apache process?


Cheers,
Tink
 
Old 12-26-2007, 01:49 PM   #5
Raakh
Member
 
Registered: May 2007
Posts: 128

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Tinkster View Post
What are the current ownerships & permissions on the directory, who's
the owner of the apache process?


Cheers,
Tink
I have dedicated server and the network administrator just installed the apache,tomcat,oracle and other softwares for onetime

how can I know that who is the owner of the apache process?

I have root access

thanks & best regards
 
Old 12-26-2007, 11:04 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
Do you have shell access to the machine? If you don't - ask the
admin. If you do - 'ps -ef |egrep "(apache|httpd)"'.

And 'ls -ld /var/www/vhosts/servername/httpdocs'


Cheers,
Tink
 
Old 12-26-2007, 11:11 PM   #7
buckeyedog
LQ Newbie
 
Registered: Oct 2007
Posts: 17

Rep: Reputation: 0
Usually the owner of an Apache process is indicated within the httpd.conf file. I would probably bank that root owns it.. The www directory usually is owned by root, I would do an

ls -ld /var/www/vhosts/servername/httpdocs

This will show the permissions of the httpdocs..
 
Old 12-27-2007, 02:52 AM   #8
Raakh
Member
 
Registered: May 2007
Posts: 128

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by buckeyedog View Post
Usually the owner of an Apache process is indicated within the httpd.conf file. I would probably bank that root owns it.. The www directory usually is owned by root, I would do an

ls -ld /var/www/vhosts/servername/httpdocs

This will show the permissions of the httpdocs..
this is the result:
drwxr-x--- 22 gws psaserv 4096 Dec 21 19:32 /var/www/vhosts/servername/httpdocs
 
Old 12-28-2007, 03:50 PM   #9
buckeyedog
LQ Newbie
 
Registered: Oct 2007
Posts: 17

Rep: Reputation: 0
Well, this tells you that gws owns httpdocs and psaserv is the group.. The drwx tells me that user has full permissions, and the r-x tells me that the group has read and execute permissions.. To change these perms do the following:

7 = rwx
6=rw
5=rx
4=r
0= nothing

# chmod 777 httpdocs - gives read,write,execute perms for owner,group and other

# chmod 700 httpdocs - gives read,write,execute for owner only
 
Old 12-29-2007, 11:29 AM   #10
Raakh
Member
 
Registered: May 2007
Posts: 128

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by buckeyedog View Post
Well, this tells you that gws owns httpdocs and psaserv is the group.. The drwx tells me that user has full permissions, and the r-x tells me that the group has read and execute permissions.. To change these perms do the following:

7 = rwx
6=rw
5=rx
4=r
0= nothing

# chmod 777 httpdocs - gives read,write,execute perms for owner,group and other

# chmod 700 httpdocs - gives read,write,execute for owner only
ohhh by using chmod 700 httpdocs the following msg appeared on my website
Please help me to solve this problem


Forbidden
You don't have permission to access /eguide/reports/index.html on this server.


--------------------------------------------------------------------------------

Apache/2.0.52 (Red Hat) Server at www.globalsteelweb.com Port 80
 
Old 12-30-2007, 10:20 PM   #11
buckeyedog
LQ Newbie
 
Registered: Oct 2007
Posts: 17

Rep: Reputation: 0
do an ls -l /eguide/reports/index.html and paste the output..
 
Old 12-30-2007, 10:21 PM   #12
buckeyedog
LQ Newbie
 
Registered: Oct 2007
Posts: 17

Rep: Reputation: 0
Actually do a ls -ld of /eguide then /eguide/reports too..
 
Old 01-01-2008, 10:19 AM   #13
Raakh
Member
 
Registered: May 2007
Posts: 128

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by buckeyedog View Post
Actually do a ls -ld of /eguide then /eguide/reports too..
thanks actually I solved the problem in the way to delete and upload again the /report/directory now its working

thanks for your cooperation

thanks again & best regards
 
  


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
Setting permissions once and for all? zener Linux - Newbie 3 04-05-2006 05:01 AM
Setting permissions sammckee Linux - Newbie 9 09-18-2003 05:01 PM
setting permissions Tigger Linux - Security 1 06-09-2003 09:20 AM
Setting Permissions johnnyde Linux - Newbie 1 05-22-2003 04:37 PM
Setting up permissions rajaram Linux - Newbie 2 12-05-2001 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:48 PM.

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