LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-04-2007, 11:29 AM   #1
luyznascimento
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Rep: Reputation: 0
FTP Tree - Uploading Files using DREAMWEAVER


Hi,


I have RED HAT 9 - working properly. I installed PROFTPD that's working properly too.

1 - I have a user called: fabiano
2 - I created a group called: bondade with RW attribute to the directory: /var/www/bondade

-> group status inside /etc/group is: bondade:x:506:fabiano
-> group privileges is: -rw-r--r-- 1 root bondade 16 Jan 4 10:56 index.php

3 - the user fabiano - is properly added to the system - the prove is:

inside: /home/fabiano
-rw-r--r-- 1 fabiano fabiano 52505 Jan 4 08:06 index.php

inside /etc/group
fabiano:x:503:

About the created GROUP:

1 - creatin my group:

/usr/sbin/groupadd bondade

--

2 - change the group ownership of /var/www/bondade to group "bondade" created above.

/bin/chgrp -R bondade /var/www/bondade

---

3 - add the proper users to the group

/usr/bin/gpasswd -a fabiano bondade

4 - to enable the bondade group's members to create, make the directory writeable by the group:

/bin/chmod g+w /var/www/bondade

5 - set the set-GID bit on /var/www/bondade to cause newly created files in the /var/www/bondade tree to have group ownersihp:

/bin/chmod g+s /var/www/bondade


Executing: ls - ld on /var/www/bondade i receive:
-rw-r--r-- 1 root bondade 16 Jan 4 10:56 index.php

====================
Publishing my files:
====================

Situation 1:
===========

I need to transfer - logged in as FABIANO - transfer my files to /var/www/bondade - when i try to do this - i receive, instead, the message telling me that or the directory does not exist or i dont have privilege permission.

This is the way i am informing the HOST DIRECTORY path to: ./www/qlinkcrm/

============
Situation 2:
============

If I try to login with the same user: fabiano to DIR -> ./fabiano i do successfuly and transfer my files without problem.

Why - I can't connect to host directory: /var/www/bondade - with the same user "fabiano" ?

Is this a PRIVILEGE problem or FTP problem?

I hope the informations above had been enough to give u a better idea of what i have here. Any further questions or informations to clarify your understanding proccess, tell me !!!

Thank u in advance for any support...

Fabiano Viana
luyznascimento_at_gmail.com
 
Old 01-04-2007, 11:38 PM   #2
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Rep: Reputation: 31
Quote:
inside /etc/group
fabiano:x:503:
you also have a group with the same name as the user?
Quote:
/bin/chmod g+s /var/www/bondade

Executing: ls - ld on /var/www/bondade i receive:
-rw-r--r-- 1 root bondade 16 Jan 4 10:56 index.php
I'm not 100%, but shouldn't that show as -rwsr--r-- if the set-gid bit were set?
have you tried just to `chown fabian:bondade index.php` or chmod 664 to see if it points to your permissions prob?

cheers

oh, and put that - one space closer to ld if you want to see the directory permissions instead of the files
ie: use ls -ld instead of:
Quote:
Executing: ls - ld on /var/www/bondade i receive:
-rw-r--r-- 1 root bondade 16 Jan 4 10:56 index.php
 
Old 01-05-2007, 02:23 AM   #3
luyznascimento
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nilleso
you also have a group with the same name as the user?

I'm not 100%, but shouldn't that show as -rwsr--r-- if the set-gid bit were set?
have you tried just to `chown fabian:bondade index.php` or chmod 664 to see if it points to your permissions prob?

cheers

oh, and put that - one space closer to ld if you want to see the directory permissions instead of the files
ie: use ls -ld instead of:
Hey Nilleso - thank u in advance for your time reading my post.

1 - by default every user on linux is part of /etc/group's dir.
2 - about the command g+s and then exec ls -ld (with no space between "-" and ld) i receive:
drwxrwsr-x 3 root bondade 4096 Jan 4 22:52 /var/www/bondade/
following what the book described is strictly the same. so, drives me to imagine that is completly correct.

I did not exec chmod as mentioned by u. As a newbie, u know, is very hard to keep up things clearly :-)

The book uses WU-FTPD but, as it mentioned too about PROFTD - I decided to start using this one - not the WU...As mentioned - I can normally connect with my normal user account: fabiano - to my directory (home/fabiano) and send my files. But directly to /var/www/bondade as a second option - well: NO. I am imagining that this is an FTP setup - what do u think?

Thank u.
Luyz Nascimento
luyznascimento_at_gmail.com
 
Old 01-07-2007, 11:06 AM   #4
luyznascimento
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
The Solution For This

Quote:
Originally Posted by luyznascimento
Hi,


I have RED HAT 9 - working properly. I installed PROFTPD that's working properly too.

1 - I have a user called: fabiano
2 - I created a group called: bondade with RW attribute to the directory: /var/www/bondade

-> group status inside /etc/group is: bondade:x:506:fabiano
-> group privileges is: -rw-r--r-- 1 root bondade 16 Jan 4 10:56 index.php

3 - the user fabiano - is properly added to the system - the prove is:

inside: /home/fabiano
-rw-r--r-- 1 fabiano fabiano 52505 Jan 4 08:06 index.php

inside /etc/group
fabiano:x:503:

About the created GROUP:

1 - creatin my group:

/usr/sbin/groupadd bondade

--

2 - change the group ownership of /var/www/bondade to group "bondade" created above.

/bin/chgrp -R bondade /var/www/bondade

---

3 - add the proper users to the group

/usr/bin/gpasswd -a fabiano bondade

4 - to enable the bondade group's members to create, make the directory writeable by the group:

/bin/chmod g+w /var/www/bondade

5 - set the set-GID bit on /var/www/bondade to cause newly created files in the /var/www/bondade tree to have group ownersihp:

/bin/chmod g+s /var/www/bondade


Executing: ls - ld on /var/www/bondade i receive:
-rw-r--r-- 1 root bondade 16 Jan 4 10:56 index.php

====================
Publishing my files:
====================

Situation 1:
===========

I need to transfer - logged in as FABIANO - transfer my files to /var/www/bondade - when i try to do this - i receive, instead, the message telling me that or the directory does not exist or i dont have privilege permission.

This is the way i am informing the HOST DIRECTORY path to: ./www/qlinkcrm/

============
Situation 2:
============

If I try to login with the same user: fabiano to DIR -> ./fabiano i do successfuly and transfer my files without problem.

Why - I can't connect to host directory: /var/www/bondade - with the same user "fabiano" ?

Is this a PRIVILEGE problem or FTP problem?

I hope the informations above had been enough to give u a better idea of what i have here. Any further questions or informations to clarify your understanding proccess, tell me !!!

Thank u in advance for any support...

Fabiano Viana
luyznascimento_at_gmail.com

========
SOLUTION
========

1 - inside FABIANO's dir on /home/fabiano - CREATE A LINK to var/www/bondade like:

:: u are here: /home/fabiano and then :

ln -s /var/www/bondade

(*) now u have a LINK inside FABIANO's dir to other directory. So, Fabiano can FTP his files not only for /home/fabiano (own dir) but either to: /var/www/bondade.

(*) on host directory - just put the name of the link - in the case above was: bondade. so it comes: ./bondade/ - so, all files published to ./bondade/ will be published to /var/www/bondade and not for /home/fabiano !!

I hope this can help u !!!

Bye,
Luyz Nascimento
 
  


Reply



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
ftp problem with uploading big files joeSVK Linux - Networking 2 05-10-2005 03:52 AM
ftp - trouble uploading files icehenge Linux - Newbie 4 04-29-2004 03:54 PM
Uploading FTP through a Linux Router msound Linux - Networking 4 06-11-2003 01:03 PM
FTP Uploading Problem Ned Linux - Networking 0 05-09-2003 02:22 PM
FTP uploading... Thymox Linux - Networking 4 02-05-2002 12:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 02:15 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
Open Source Consulting | Domain Registration