LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-01-2013, 03:57 AM   #1
Peleus
Member
 
Registered: Mar 2003
Posts: 77

Rep: Reputation: 15
Can't access file via transverse?


Hi everyone. I'm doing some Webgoat tutorials at the moment and I've run into a weird problem, it seems as though I can't access a file via directory transverse.

On the machine, the following commands / results take place.

root@owaspbwa:/var/lib/tomcat6/conf# ls
<files blah blah> tomcat-users.xml
root@owaspbwa:/var/lib/tomcat6/conf# nano tomcat-users.xml (tab auto complete)
Successfully opens file

root@owaspbwa:/var/lib/tomcat6/webapps/WebGoat/lesson_plans/English# nano ../../../../conf/tomcat-users.xml (confirmed by tab auto complete each stage)
Opens a blank file

Any idea why I cannot open this file directly via transversing? I'm happy to post any further info you may need.
 
Old 01-01-2013, 04:20 AM   #2
dinkus223
LQ Newbie
 
Registered: Aug 2010
Location: Memphis, 10
Distribution: Rotates on weekly or monthly basis
Posts: 22

Rep: Reputation: 3
Add an extra
Code:
../
. The four leaves you in the webapps directory. Confirm while in the English directory with:
Code:
ls ../../../../

Last edited by dinkus223; 01-01-2013 at 04:22 AM. Reason: Added code blocks to clarify. Kinda confusing with the dots.
 
Old 01-02-2013, 05:59 AM   #3
Peleus
Member
 
Registered: Mar 2003
Posts: 77

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dinkus223 View Post
Add an extra
Code:
../
. The four leaves you in the webapps directory. Confirm while in the English directory with:
Code:
ls ../../../../
No, definitely the right directory. Tried for the sake of it anyway.

root@owaspbwa:/var/lib/tomcat6/webapps/WebGoat/lesson_plans/English#

../ goes to

root@owaspbwa:/var/lib/tomcat6/webapps/WebGoat/lesson_plans#

../../ goes to

root@owaspbwa:/var/lib/tomcat6/webapps/WebGoat#

../../../ goes to

root@owaspbwa:/var/lib/tomcat6/webapps#

../../../../ goes to

root@owaspbwa:/var/lib/tomcat6#

../../../../conf goes to

root@owaspbwa:/var/lib/tomcat6/conf#

../../../../conf/tomcat-users.xml should go to

root@owaspbwa:/var/lib/tomcat6/conf/tomcat-users.xml but it doesn't for some reason. Confirmed by tab auto complete on each stage, along with getting the final path name, but it won't let me actually access the file when I enter.

As a exercise I went to /var/lib and opened via nano /tomcat6/conf/tomcat-users.xml and it opened fine. I went to /var/lib/tomcat6/webapps and tried to open via nano ../conf/tomcat-users.xml and it won't let me open there either.
 
Old 01-03-2013, 01:22 PM   #4
dinkus223
LQ Newbie
 
Registered: Aug 2010
Location: Memphis, 10
Distribution: Rotates on weekly or monthly basis
Posts: 22

Rep: Reputation: 3
Try "ls -l" to check if any special permission bits are set and the owner and group. You can try "ls -Z" if SELinux is running .
Check for any ACLs:
Code:
getfacl -e /var/lib/tomcat6/conf/tomcat-users.xml
# Edit: Forgot something
Check the attributes of the file
Code:
/var/lib/tomcat6/conf/tomcat-users.xml

Last edited by dinkus223; 01-03-2013 at 01:35 PM. Reason: Forgot something
 
  


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
software to access file system.. how to allow access for non root users? stdcinout Linux - Newbie 8 03-09-2010 01:55 PM
Access control with access.conf file custangro Linux - Enterprise 4 06-02-2009 12:22 PM
PHP file download without direct file access prasepretep Programming 2 02-14-2008 06:34 AM
is any option to access ms-access file hitlar Fedora 2 09-09-2006 12:14 AM
Isolating read access to only to one file only by another file. jon_k Linux - Software 3 08-14-2004 06:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:57 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration