LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   setting permissions (https://www.linuxquestions.org/questions/linux-newbie-8/setting-permissions-609163/)

Raakh 12-26-2007 04:07 AM

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

ingerul9 12-26-2007 05:07 AM

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.

Raakh 12-26-2007 05:09 AM

Quote:

Originally Posted by ingerul9 (Post 3001729)
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

Tinkster 12-26-2007 12:43 PM

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


Cheers,
Tink

Raakh 12-26-2007 01:49 PM

Quote:

Originally Posted by Tinkster (Post 3002065)
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

Tinkster 12-26-2007 11:04 PM

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

buckeyedog 12-26-2007 11:11 PM

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..

Raakh 12-27-2007 02:52 AM

Quote:

Originally Posted by buckeyedog (Post 3002519)
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

buckeyedog 12-28-2007 03:50 PM

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

Raakh 12-29-2007 11:29 AM

Quote:

Originally Posted by buckeyedog (Post 3004191)
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

buckeyedog 12-30-2007 10:20 PM

do an ls -l /eguide/reports/index.html and paste the output..

buckeyedog 12-30-2007 10:21 PM

Actually do a ls -ld of /eguide then /eguide/reports too..

Raakh 01-01-2008 10:19 AM

Quote:

Originally Posted by buckeyedog (Post 3006232)
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


All times are GMT -5. The time now is 07:57 AM.