LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   group (https://www.linuxquestions.org/questions/linux-newbie-8/group-795952/)

tommytomato 03-17-2010 01:27 AM

group
 
hi all

I wish to give access to my self to upload to www on my system

right now i'm in my Home Directory ( /home/tommytomato )

i see that the group is www-data for the www DIR

do i add my self to that group and then change user dir path to ( /var/www ) to upload files to www

system is Ubuntu 9.10, I've also got webmin installed, it was the only way I could find out what group www was

TT ( karl )

Sayan Acharjee 03-17-2010 01:36 AM

What service you wish to use to upload files in the www directory? assuming that you are on a remote system.

tommytomato 03-17-2010 01:43 AM

Quote:

Originally Posted by sayan_acharjee (Post 3901360)
What service you wish to use to upload files in the www directory? assuming that you are on a remote system.

remote system NO, I have the server next to me on the floor, LOL

I want to be able to upload via FTP using my user account to upload files to the www with out changing any permissions to the apache2 if you get what I mean

vsftpd is working OK, www is working, http://www.rockinghamgateway.com/

I have a joomla site, plus others to upload, I can use winscp to upload to the www, but that does it has root, I want to keep away from using root as much as possible unless its for apt-get updates

TT ( karl )

Sayan Acharjee 03-17-2010 01:49 AM

Quote:

Originally Posted by tommytomato (Post 3901365)
remote system NO, I have the server next to me on the floor, LOL

I want to be able to upload via FTP using my user account to upload files to the www with out changing any permissions to the apache2 if you get what I mean

vsftpd is working OK, www is working, http://www.rockinghamgateway.com/

I have a joomla site, plus others to upload, I can use winscp to upload to the www, but that does it has root, I want to keep away from using root as much as possible unless its for apt-get updates

TT ( karl )

I'd suggest you to create a system user with password, and you should set its home directory as the www directory.
Now whenever this user will be logged in with ftp, it will be able upload files in www. :)

tommytomato 03-17-2010 01:54 AM

Quote:

Originally Posted by sayan_acharjee (Post 3901369)
I'd suggest you to create a system user with password, and you should set its home directory as the www directory.
Now whenever this user will be logged in with ftp, it will be able upload files in www. :)

OK, I created a user when i installed the system a few hours ago, it created ( /home/tommytomato ) dir, so your saying basically to edit path to ( /var/www )

TT ( karl )

tommytomato 03-17-2010 01:55 AM

just a note, I only have one user on the system and that's my self, not planning on having any more

TT ( karl )

Sayan Acharjee 03-17-2010 02:06 AM

Quote:

Originally Posted by tommytomato (Post 3901378)
just a note, I only have one user on the system and that's my self, not planning on having any more

TT ( karl )

See whenever you are logged in with a normal user account, ftp will put in /var/ftp directory, I don't know how to change this default behavior.
But whenever a system user uses ftp to login it will put that user into its home directory, and by setting the home directory according to your need you can change this default behavior.

tommytomato 03-17-2010 02:14 AM

Quote:

Originally Posted by sayan_acharjee (Post 3901385)
See whenever you are logged in with a normal user account, ftp will put in /var/ftp directory, I don't know how to change this default behavior.
But whenever a system user uses ftp to login it will put that user into its home directory, and by setting the home directory according to your need you can change this default behavior.

I see, I changed the dir to /var/www, logged in via FTP, tried to upload some files and I get this message

Quote:

/var/www/img

550 Permission denied.
Could not download /home/tommytomato/Desktop/website/img from local filesystem
Wonder do i add my self to the group www-data

TT ( karl )

tommytomato 03-17-2010 02:23 AM

Well that didn't work, LOL

TT ( karl )

Sayan Acharjee 03-17-2010 02:25 AM

Quote:

Originally Posted by tommytomato (Post 3901396)
I see, I changed the dir to /var/www, logged in via FTP, tried to upload some files and I get this message



Wonder do i add my self to the group www-data

TT ( karl )

Look for the UID_MIN value in /etc/login.defs
Then change the UID of the user to something below than that value, this value should not clash with other users UID. You can check /etc/passwd to determine if it is already used by any other user.

Then log out and login again and try using ftp, see if its working.

tommytomato 03-17-2010 02:32 AM

Quote:

Originally Posted by sayan_acharjee (Post 3901418)
Look for the UID_MIN value in /etc/login.defs
Then change the UID of the user to something below than that value, this value should not clash with other users UID. You can check /etc/passwd to determine if it is already used by any other user.

Then log out and login again and try using ftp, see if its working.

right now its

Quote:

tommytomato:x:1000:1000:tommytomato,,,:/home/tommytomato:/bin/bash
TT ( karl )

Sayan Acharjee 03-17-2010 02:35 AM

Quote:

Originally Posted by tommytomato (Post 3901424)
right now its



TT ( karl )

I can see that your UID is 1000 here change that to something lower than UID_MIN value.

tommytomato 03-17-2010 02:47 AM

Quote:

Originally Posted by sayan_acharjee (Post 3901429)
I can see that your UID is 1000 here change that to something lower than UID_MIN value.

yer i did to 900, lol, it still didn't work

TT ( karl )

Sayan Acharjee 03-17-2010 02:51 AM

I don't think 900 is lower than UID_MIN value. I still don't know whats UID_MIN value in your system, so can't tell you what should be the UID of that user.
P.S. Look into the /etc/login.defs for UID_MIN value.

tommytomato 03-17-2010 03:00 AM

Ok will do

Quote:

#
# Min/max values for automatic uid selection in useradd
#
UID_MIN 1000
UID_MAX 60000
I did find this thou, alittle unsure about it http://ubuntuforums.org/showthread.php?p=2947635

TT ( karl )


All times are GMT -5. The time now is 01:20 AM.