Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Linux question on directories.. Post 302960783 by samnyc on Thursday 19th of November 2015 02:45:13 PM
Old 11-19-2015
Quote:
Originally Posted by Aia
Are you referring to the dot highlighted in red?
That indicates that the server uses SELinux and that the file has a SELinux security context.
Most likely you are being denied by SELinux. You may DEBUG it by temporarily disabling it, issuing the following command: setenforce "Permissive"
If after that things work, please, find out what context you need to fix and enable it again with setenforce "Enforcing"
Thank you so much for your reply. I didn't know I enabled the SELinux. Now I set to permissive as you have told me. But still getting this 403 error message on Apache. Any idea.

wget 10.xx.x.xx
Code:
--2015-11-19 11:26:23--  http://10.xx.x.xx/
Connecting to 10.xx.x.xx:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2015-11-19 11:26:23 ERROR 403: Forbidden.

On the access log, I see this
Code:
 [19/Nov/2015:14:46:59 -0500] "GET / HTTP/1.0" 403 5039 "-" "Wget/1.12 (linux-gnu)"

error_log
[Thu Nov 19 14:55:10 2015] [error] [client 10.xx.x.xx] Directory index forbidden by Options directive: /var/www/html/

I changed the whole /var/www/html to 777. Still getting this error message.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mv directories question

I'm really new to Unix and its commands. I tried to move a file from the home directory to another one but I didn't type the full name of the new directory. I think the computer created another directory in the home directory and put it in there. However, now I can't access it and it doesn't even... (3 Replies)
Discussion started by: scheng12
3 Replies

2. Programming

question about empty directories in unix system

how is it possible for a directory to be empty and still have a size greater than 0 in bytes... i made a shell script that shows info about all files/directories and this is what came up the last one is the size, here its showing 1024 in the for loop i did something like for h in * .*; do ... (4 Replies)
Discussion started by: omega666
4 Replies

3. Shell Programming and Scripting

question on blackslashes and slashes in directories

Since I'm usually on windows I've came across different shells like Cygwin, Hamilton, and MKS. I've been working in csh most of the time, so porting scripts from one shell to another can be fairly annoying and confusing. When specifying a directory I noticed that certain shells do not recognize... (1 Reply)
Discussion started by: vas28r13
1 Replies

4. UNIX for Advanced & Expert Users

Is it possible to password protect directories in linux?

Hi, I am using Red Hat OS 5.0, is there any way that i can password protect directories. I know i can change permission so that no other user can access the content, but sometimes in my office environment i need to share vnc terminal with other people from my login itself. So i want that if user... (1 Reply)
Discussion started by: sarbjit
1 Replies

5. Shell Programming and Scripting

Need help: Script to report timestamp of directories in a specific path from multiple Linux server

Need help Please help on how to write a script which can echo timestamp, size of subdirectories in a specific path from multiple Linux servers to a text file. I can ssh with a common user to all the servers from a build box. Basic idea what I had was: ssh <commonuser>@<each box> cd... (1 Reply)
Discussion started by: sudhichadaga
1 Replies

6. UNIX for Advanced & Expert Users

Linux fdisk question (Oracle Enterprise Linux)

OS: Oracle Enterprise Linux 6.2 Hypervisor: VMWare workstation 9 I created a VM and attached a 7gb virtual disk to it. Using fdisk , I partioned the disk like below. The filesystems mounted on this is working fine. But I am seeing the message Partition n does not end on cylinder boundary.... (2 Replies)
Discussion started by: kraljic
2 Replies

7. Programming

Accessing directories in Linux

I'm new to Linux and trying to port a c++ program from windows. what I'm trying to do is copy a file to a directory off the root of the drive First off the program is located and running from Drive:\Base\Web\Today\Program.exe And trying to copy to: Drive:\Base\cpics windows... (10 Replies)
Discussion started by: pinbot
10 Replies

8. Solaris

Giving read write permission to user for specific directories and sub directories.

I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. This is for Solaris. Please help. (1 Reply)
Discussion started by: blinkingdan
1 Replies
DAV::Response(3pm)					User Contributed Perl Documentation					DAV::Response(3pm)

NAME
HTTP::DAV::Response - represents a WebDAV HTTP Response (ala HTTP::Response) SYNOPSIS
require HTTP::DAV::Response; DESCRIPTION
The HTTP::DAV::Response class encapsulates HTTP style responses. A response consists of a response line, some headers, and (potentially empty) content. HTTP::DAV::Response is a subclass of "HTTP::Response" and therefore inherits its methods. (HTTP::Response in turn inherits it's methods from "HTTP::Message"). Therefore, this class actually inherits a rich library of functions. You are more likely wanting to read the "HTTP::Response" class as opposed to this class. Instances of this class are usually created by a "HTTP::DAV::Resource" object after it has performed some request (such as get, lock, delete, etc). You use the object to analyse the success or otherwise of the request. HTTP::DAV::Response was created to handle two extra functions that normal HTTP Responses don't require: - WebDAV reponses have 6 extra error codes: 102, 207, 422, 423, 424 and 507. Older versions of the LWP's C<HTTP::Status> class did not have these extra codes. These were added. - WebDAV responses can actually contain more than one response (and often DO contain more than one) in the form of a "Multistatus". These multistatus responses come in the form of an XML document. HTTP::DAV::Response can accurately parse these XML responses and emulate the normal of the C<HTTP::Response>. HTTP::DAV::Response transparently implements these extra features without the user having to be aware, so you really should be reading the "HTTP::Response" documentation for most of the things you want to do (have I already said that?). There are only a handful of custom functions that HTTP::DAV::Response returns and those are to handle multistatus requests, "messages()" and "codes()". The six extra status codes that DAV servers can be returned in an HTTP Response are: 102 => "Processing. Server has accepted the request, but has not yet completed it", 207 => "Multistatus", 422 => "Unprocessable Entity. Bad client XML sent?", 423 => "Locked. The source or destination resource is locked", 424 => "Failed Dependency", 507 => "Insufficient Storage. The server is unable to store the request", See "HTTP::Status" for the rest. HANDLING A MULTISTATUS
So, many DAV requests may return a multistatus ("207 multistatus") instead of, say, "200 OK" or "403 Forbidden". The HTTP::DAV::Response object stores each "response" sent back in the multistatus. You access them by array number. The following code snippet shows what you will normally want to do: ... $response = $resource->lock(); if ( $response->is_multistatus() ) { foreach $num ( 0 .. $response->response_count() ) { ($err_code,$mesg,$url,$desc) = $response->response_bynum($num); print "$mesg ($err_code) for $url "; } } Would produce something like this: Failed Dependency(424) for /test/directory Locked(423) for /test/directory/file3 This says that we couldn't lock /test/directory because file3 which exists inside is already locked by somebody else. METHODS
is_multistatus This function takes no arguments and returns a 1 or a 0. For example: if ($response->is_multistatus() ) { } If the HTTP reply had "207 Multistatus" in the header then that indicates that there are multiple status messages in the XML content that was returned. In this event, you may be interested in knowing what the individual messages were. To do this you would then use "messages". response_count Takes no arguments and returns "the number of error responses -1" that we got. Why -1? Because usually you will want to use this like an array operator: foreach $num ( 0 .. $response->response_count() ) { print $response->message_bynum(); } response_bynum Takes one argument, the "response number" that you're interested in. And returns an array of details: ($code,$message,$url,$description) = response_bynum(2); where $code - is the HTTP error code (e.g. 403, 423, etc). $message - is the associated message for that error code. $url - is the url that this error applies to (recall that there can be multiple responses within one response and they all relate to one URL) $description - is server's attempt at an english description of what happened. code_bynum Takes one argument, the "response number" that you're interested in, and returns it's code. E.g: $code = $response->code_bynum(1); See "response_bynum()" message_bynum Takes one argument, the "response number" that you're interested in, and returns it's message. E.g: $code = $response->message_bynum(1); See "response_bynum()" url_bynum Takes one argument, the "response number" that you're interested in, and returns it's url. E.g: $code = $response->message_bynum(1); See "response_bynum()" description_bynum Takes one argument, the "response number" that you're interested in, and returns it's description. E.g: $code = $response->message_description(1); See "response_bynum()" messages Takes no arguments and returns all of the messages returned in a multistatus response. If called in a scalar context then all of the messages will be returned joined together by newlines. If called in an array context the messages will be returned as an array. $messages = $response->messages(); e.g. $messages eq "Forbidden Locked"; @messages = $response->messages(); e.g. @messages eq ["Forbidden", "Locked"]; This routine is a variant on the standard "HTTP::Response" "message()". perl v5.10.1 2009-01-29 DAV::Response(3pm)
All times are GMT -4. The time now is 06:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy