LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-17-2010, 02:27 AM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 939

Rep: Reputation: 32
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 )
 
Old 03-17-2010, 02:36 AM   #2
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
What service you wish to use to upload files in the www directory? assuming that you are on a remote system.
 
Old 03-17-2010, 02:43 AM   #3
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 939

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by sayan_acharjee View Post
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 )
 
Old 03-17-2010, 02:49 AM   #4
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
Quote:
Originally Posted by tommytomato View Post
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.
 
Old 03-17-2010, 02:54 AM   #5
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 939

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by sayan_acharjee View Post
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 )
 
Old 03-17-2010, 02:55 AM   #6
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 939

Original Poster
Rep: Reputation: 32
just a note, I only have one user on the system and that's my self, not planning on having any more

TT ( karl )
 
Old 03-17-2010, 03:06 AM   #7
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
Quote:
Originally Posted by tommytomato View Post
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.
 
Old 03-17-2010, 03:14 AM   #8
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 939

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by sayan_acharjee View Post
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 )
 
Old 03-17-2010, 03:23 AM   #9
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 939

Original Poster
Rep: Reputation: 32
Well that didn't work, LOL

TT ( karl )
 
Old 03-17-2010, 03:25 AM   #10
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
Quote:
Originally Posted by tommytomato View Post
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.
 
Old 03-17-2010, 03:32 AM   #11
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 939

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by sayan_acharjee View Post
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 )
 
Old 03-17-2010, 03:35 AM   #12
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
Quote:
Originally Posted by tommytomato View Post
right now its



TT ( karl )
I can see that your UID is 1000 here change that to something lower than UID_MIN value.
 
Old 03-17-2010, 03:47 AM   #13
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 939

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by sayan_acharjee View Post
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 )
 
Old 03-17-2010, 03:51 AM   #14
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
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.
 
Old 03-17-2010, 04:00 AM   #15
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 939

Original Poster
Rep: Reputation: 32
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 )
 
  


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
Secondary group users need to change the file permissions of primary group files? sunnybmv Linux - Newbie 3 12-10-2009 05:57 PM
group: add complete group into other group max_mad SUSE / openSUSE 1 04-12-2006 02:43 AM
well, there's info written inside /etc/group. accidentally del /etc/group in RedHat9 karmakid Red Hat 1 07-27-2005 11:27 PM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 05:01 PM
[alert] (22) Invalid argument : setgid : unable to set group id to Group 4294967295 Niraj Linux - Networking 1 12-13-2001 07:58 AM


All times are GMT -5. The time now is 08:24 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