LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 03:31 AM   #16
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32

I'm not wining today lol

I tried this sudo useradd -G www-data tommytomato

and I get this

useradd: user 'tommytomato' already exists

TT ( karl )
 
Old 03-17-2010, 04:59 AM   #17
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Ok i got this far

I created another user, I'm able to log in via FTP to /var/www

I'm unable to write to the directory, what permissons do i give that user ?

any ideas please

TT ( karl )
 
Old 03-17-2010, 04:59 AM   #18
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
usermod -a -G www-data tommytomato
 
Old 03-17-2010, 05:03 AM   #19
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by tommytomato View Post
Ok i got this far

I created another user, I'm able to log in via FTP to /var/www

I'm unable to write to the directory, what permissons do i give that user ?

any ideas please

TT ( karl )


Now, you need to set an acl for that new user giving rwx permission in /var/www directory.
Thats how I solved this problem.

Last edited by Sayan Acharjee; 03-17-2010 at 05:04 AM.
 
Old 03-17-2010, 05:09 AM   #20
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
what do you mean by acl ?

do I just run chmod rwx user /var/www

TT ( karl )
 
Old 03-17-2010, 05:18 AM   #21
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
I mean you need to create an access control list for the user allowing it to to read-write-execute in the directory, I am not talking about the usual chmod driven permission.
Here is how you can do this:
edit the /etc/fstab file in the following manner:
Quote:
/dev/sda7 / ext3 defaults,acl 0 0
The mount point can be different depending on the way your system is partitioned, if the /var partition is mounted somewhere else then you need to edit that line by putting ,acl option after defaults.
Then remount that partition:
Quote:
#mount -o remount,acl /
Set the acl:
Quote:
#setfacl -m u:username:rwx /var/www
 
Old 03-17-2010, 05:20 AM   #22
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
WTF, sorry, confuse me big time, lol, I'll look into it now

TT ( karl )
 
Old 03-17-2010, 05:40 AM   #23
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
when i run sudo fdisk -l it doesn't show me the ext, I am a little lost

Quote:
/dev/sda1 * 1 24159 194057136 83 Linux
/dev/sda2 24160 24321 1301265 5 Extended
/dev/sda5 24160 24321 1301233+ 82 Linux swap / Solaris

TT ( karl )
 
Old 03-17-2010, 05:42 AM   #24
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by tommytomato View Post
when i run sudo fdisk -l it doesn't show me the ext, I am a little lost




TT ( karl )
You need to run
Quote:
#vi /etc/fstab
not fdisk -l
 
Old 03-17-2010, 05:54 AM   #25
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
So i'm looking for ext4 hey

TT ( karl )
 
Old 03-17-2010, 05:55 AM   #26
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Quote:
/etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=899707a5-c034-49b2-a932-e61529ba99c4 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=f5b5c4b5-733f-4849-9f9c-901707b46adc none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
TT ( karl )
 
Old 03-17-2010, 05:56 AM   #27
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Quote:
/etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=899707a5-c034-49b2-a932-e61529ba99c4 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=f5b5c4b5-733f-4849-9f9c-901707b46adc none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
TT ( karl )
 
Old 03-17-2010, 05:56 AM   #28
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
This is my fastab file, see if you can get some ideas:
Quote:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
UUID=c663f955-f887-47dd-aae9-b1132ddc7d7c / ext3 defaults,acl 1 1
UUID=e5d80a71-6c23-407b-94cf-6e9e51cf5707 /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
UUID=ccaf4783-860f-4992-9322-9f7dcac74a81 swap swap defaults 0 0
/dev/sda1 /new ext3 defaults 0 0
/dev/sda6 /sda6 ext3 defaults 0 0
/dev/sda7 /var/ftp/pub/users ext3 defaults,acl 0 0

Last edited by Sayan Acharjee; 03-17-2010 at 05:58 AM.
 
Old 03-17-2010, 06:03 AM   #29
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by sayan_acharjee View Post
This is my fastab file, see if you can get some ideas:
Sorry I'm lost too, LOL

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

Rep: Reputation: 64
I'm lost as well :P j/k
edit this line in the following manner:
Quote:
UUID=899707a5-c034-49b2-a932-e61529ba99c4 / ext4 errors=remount-ro,acl 0 1
Quote:
#mount -o remount,acl /
#setfacl -m u:username:rwx /var/www

Last edited by Sayan Acharjee; 03-17-2010 at 06:14 AM.
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:09 AM.

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