Setting up FTP access to my Tomcat Dir


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Setting up FTP access to my Tomcat Dir
# 1  
Old 07-28-2007
Setting up FTP access to my Tomcat Dir

Hi Guys,

Im trying to set up FTP to my Apache Tomcat dir on my server so my web designer can FTP in and look at things in a live environment.


However at first I couldn't write to the dir, so i change some permissions, and now I cant access it at all!

Here is my LS -all output:

Code:
harold:/var/lib/tomcat5/webapps# ls -all
total 1068
drwsr-xr-x  9 tomcat5 root           4096 2007-07-20 19:38 .
drwxr-xr-x  6 root    root           4096 2007-07-04 20:39 ..
drwxr-xr-x  4 root    root           4096 2007-07-04 20:42 balancer
drwxr-xr-x 22 root    root           4096 2007-07-04 20:42 jsp-examples
drwxr-xr-x  3 root    root           4096 2007-07-04 20:42 ROOT
drwxr-xr-x  5 root    root           4096 2007-07-04 20:42 servlets-examples
drwxr-xr-x 10 root    root           4096 2007-07-04 20:42 tomcat-docs
drwxrwxr-- 10 tomcat5 tomcatusers    4096 2007-07-23 09:36 uPhoto
-rw-r--r--  1 tomcat5 nogroup     1051767 2007-07-20 19:38 uPhoto.war
drwxr-xr-x  3 root    root           4096 2007-07-04 20:42 webdav

Are my permissions correct?
# 2  
Old 07-28-2007
Code:
drwsr-xr-x  9 tomcat5 root           4096 2007-07-20 19:38 .

Why did you turn on the setuid bit for a directory? Do a "chmod 755 ." in that directory to turn it off and see if that helps.
# 3  
Old 07-28-2007
nothing I am afraid...

I set the sticky as I want all files in that dir to be the same user, so when uploaded they are still owned by Tomcat - I read this somewhere... probly way off..

New ls

Code:
harold:/var/lib/tomcat5/webapps/uPhoto# ls -all
total 60
drwxr-xr-x 10 tomcat5 tomcatusers 4096 2007-07-23 09:36 .
drwsr-xr-x  9 tomcat5 root        4096 2007-07-20 19:38 ..
drwxr-xr-x  2 tomcat5 tomcatusers 4096 2007-07-20 19:38 css
drwxr-xr-x  2 tomcat5 tomcatusers 4096 2007-07-20 19:38 err
drwxr-xr-x  2 tomcat5 tomcatusers 4096 2007-07-20 19:38 images
drwxr-xr-x  2 tomcat5 tomcatusers 4096 2007-07-20 19:38 inc
-rwxr-xr-x  1 tomcat5 tomcatusers 2189 2007-07-20 19:38 index.jsp
-rwxr-xr-x  1 tomcat5 tomcatusers  445 2007-07-20 19:38 jsp1_error.jsp
-rwxr-xr-x  1 tomcat5 tomcatusers  318 2007-07-20 19:38 jsp1.jsp
-rwxr-xr-x  1 tomcat5 tomcatusers 1369 2007-07-20 19:38 login.jsp
drwxr-xr-x  2 tomcat5 tomcatusers 4096 2007-07-20 19:38 META-INF
-rwxr-xr-x  1 tomcat5 tomcatusers 3524 2007-07-20 19:38 signup.jsp
drwxr-xr-x  2 tomcat5 tomcatusers 4096 2007-07-28 12:34 thumbs
drwxr-xr-x  3 tomcat5 tomcatusers 4096 2007-07-20 19:38 userimages
drwxr-xr-x  4 tomcat5 tomcatusers 4096 2007-07-20 19:38 WEB-INF

# 4  
Old 07-28-2007
Your new ls is of a different directory. Smilie

The setuid bit is different than the sticky bit and neither bit will have the effect you want with any os that I am familiar with. (But the setgid bit does have a similiar effect on groups with many os's.) But I could have missed something. What os are you using?

Your new ls is of a child directory of the original directory. And I can see that the setuid bit continues to be set in the original directory.

Code:
drwsr-xr-x  9 tomcat5 root        4096 2007-07-20 19:38 ..

# 5  
Old 07-28-2007
I think I found the prob - I tried to CHMOD 777 the dir and it worked fine, so now that leaves me with a new problem...

My groups all look fine.

i have a user WebDes:TomcatUsers
and tomcat5:TomcatUsers

all the files should be ChMod 775 so then readable by all usrs in TomcatUsers (tomcat/WebDes)

Is there something I should be looking at in my FTP conf?

Im using Debian (etch) and VsFTPd by the way!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Apache Tomcat(403 Access Denied)

Good evening, i've got a problem. I fail to enter "Manager App" in Apache Tomcat/9.0.0.M9 on server, it says "403 Access Denied». for example, server address is 192.168.1.4, when I type 'localhost ' in the browser and press "Manager App", then everything is ok. but if I enter 192.168.1.4 and press... (0 Replies)
Discussion started by: v.k.l.chr.by
0 Replies

2. UNIX and Linux Applications

Problem with Apache Tomcat FTP Server - download gets 404

Hi $ brew -v install tomcat Homebrew 0.9.5 ==> Downloading http://www.apache.org/dyn/closer.cgi?path=tomcat/tomcat-7/v7.0.53/bin/apache-tomcat-7.0.53.tar.gz ==> Best Mirror http://mirror.switch.ch/mirror/apache/dist/tomcat/tomcat-7/v7.0.53/bin/apache-tomcat-7.0.53.tar.gz /usr/bin/curl -fLA... (1 Reply)
Discussion started by: slashdotweenie
1 Replies

3. UNIX for Dummies Questions & Answers

Access the oldest file in a dir

I have to move files (one by one) from one dir to another, in such a way that the oldest file should be moved first followed by the latest file. The source dir (from where I am moving files) may contains a minimum of 20K files at any point of time. I am not able to use "ls -ltr" as it throws error... (6 Replies)
Discussion started by: rajesh8s
6 Replies

4. Solaris

Solaris:Tomcat-Failed to access resource /WEB-INF/lib/One.jar

Hi All, I have configured the tomcat 6.0.26 and it is working fine in Solaris. Testing JSP and SERVLET program I ensured tomcat is configured properly (My guess). ------------------- Now I placed my Servlet and JSP code under /users/kalai/sample. I have created a soft link to... (1 Reply)
Discussion started by: kalpeer
1 Replies

5. UNIX for Dummies Questions & Answers

Copying dir (and sub dir) file names from ftp server to txt file in diff server

Hey all, i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file. any help is appreciated...thank you in advance (1 Reply)
Discussion started by: deking
1 Replies

6. Web Development

How to restict close access in tomcat /opencms

There are solaris10+(apache+tomcat). Tomcat serve .war file from opencms. Opencms has admin console www.domain.ru/system/login/. Apache role is mod_proxy for opencms: Attempt close access at path www.domain.ru/system/login/ using .httpacess doesn't solve it. Please help!:confused: (0 Replies)
Discussion started by: sotich82
0 Replies

7. UNIX for Dummies Questions & Answers

TomCat access in an Remote Linux Server

Hi all, I Installed Tomcat in an remote linux server (/usr/tomcat)and start service, using ./startup.sh (and tried with ./catalina.sh too). //----------------------------------------------------------------// # ./startup.sh Using CATALINA_BASE: /usr/tomcat/apache-tomcat-6.0.16/ Using... (1 Reply)
Discussion started by: gothama
1 Replies

8. UNIX for Advanced & Expert Users

user has access only to one dir

Hello i want to ask how can i let a newly created user to access only one directory and not any other directory at all.: (1 Reply)
Discussion started by: learn82
1 Replies

9. Shell Programming and Scripting

User dir access using ~ in sh

I am writing code to copy file if user dir exists. Code snippet : #!/bin/sh if then cp ~user1/file file else cp ~user2/file file fi This code works if shell is ksh but not if shell is sh. Can anyone suggest how this can work in sh script? Thanks, Ashish (1 Reply)
Discussion started by: Ashishp
1 Replies

10. UNIX for Dummies Questions & Answers

dir access

How do I give specific user the ablity to create, delete, rename, and alter in a specific directory. I am using redhad 7.2 and would like to give a specific user the rights to a dirc in the main www directory. (1 Reply)
Discussion started by: macdonto
1 Replies
Login or Register to Ask a Question