Solved

chmod ???

Posted on 2000-04-09
4
404 Views
Last Modified: 2013-12-06
Hi ! I got a new webserver with red hat.
I want to chmod an directory, so that only my perl scripts have access to it and not any user by the www. How do I do this ?

+rwx  +rwx  -rwx ????

regards
ItsMe
0
Comment
Question by:ItsMe
  • 2
  • 2
4 Comments
 
LVL 3

Expert Comment

by:jyu_88
Comment Utility
question is who perl script runs as and what rights they require for this directory? If they are CGI scripts,and web server runs as 'nobody', and
1) you don't have SuEexc or CGI wrapper.
chown root:root privateDir
chmod 771 privateDir
The last bit of permission depends on what kind of access you perl script needs to this directory, ready some file under(771), write some file under(773)?

or more likeyly,
chown nobody:root privdateDir
chmod
2) you do have CGI wrapper or SuExec set up to run it as some legit user on your system, say, 'cgiowner'
chown cgiowner:root privdateDir
chmod 700 privdateDir
0
 

Author Comment

by:ItsMe
Comment Utility
my script runs in /cgi-bin
i need to read and write some files in /cgi-bin/db or i use an dir lower than the www has access to. but there's the second problem: other users of the server have access to my scripts and files by their telnet account.
0
 
LVL 3

Accepted Solution

by:
jyu_88 earned 30 total points
Comment Utility

/cgi-bin is just an alias, in other words, you can put your cgi-bin anywhere you can, far away from DocumentationRoot. my htdocs is at /home/httpd/htdocs while my cgi scripts are at /etc/httpdTo avoid local user to access those scripts, you can do something like:chown root:nobody cgiBinDirchown 750 cgiBinDirchown 770 cgiBinDir/dbThis way, user other than root and those in nobody group cannot access your cgibinDir.
0
 

Author Comment

by:ItsMe
Comment Utility
thanks
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now