Solved

chmod ???

Posted on 2000-04-09
4
406 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
ID: 2697794
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
ID: 2697906
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
ID: 2698195

/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
ID: 2698443
thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Guacamole cut and paste issue 3 47
CentOS 7 Installation 7 59
Centos 6 User Can't Assign Password 2 25
Choosing CentOS 16 57
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
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.

920 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

15 Experts available now in Live!

Get 1:1 Help Now