Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Permissions issue with FTP to /var/www
New Posts  All Forums:Forum Nav:

Permissions issue with FTP to /var/www

post #1 of 7
Thread Starter 
I installed vsftpd on a server. Created a user (useradd) FTP and set it's home directory to /var/www

The problem I have is, when I FTP a file to the server, samba isn't able to access it until I chmod the file.

What can I do to fix?
    
CPUMotherboardGraphicsRAM
E6300 @ 2.3 GHz Foxconn Intel x3100 4.5 Rendition 
Hard DriveOptical DriveOSMonitor
160+500 DVDRW Server 08 x64 Princeton 17'' square 
KeyboardPowerCaseMouse
Unicomp Germanic Model M 250W Dell Vostro 200 Gateway Ball Mouse 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
E6300 @ 2.3 GHz Foxconn Intel x3100 4.5 Rendition 
Hard DriveOptical DriveOSMonitor
160+500 DVDRW Server 08 x64 Princeton 17'' square 
KeyboardPowerCaseMouse
Unicomp Germanic Model M 250W Dell Vostro 200 Gateway Ball Mouse 
  hide details  
Reply
post #2 of 7
Hmm theres a option in vsftp conf that will chmod on upload. Im doing the same at the moment, however as ive got virtual hosts im pointing to /home/X/www

local_umask=022 maybe what you need in /etc/vsftp.conf
Escobar
(9 items)
 
Supercomputer ^_^
(13 items)
 
 
CPUMotherboardGraphicsRAM
1055T M4A88T-D EVO USB3 ATI 6850 4 GB 
Optical DriveOSMonitorKeyboard
DVD RW Windows 8 Pro lp1900 + 2 X 15 inch dell Microsoft Comfort Curve 
PowerCase
600watt thermaltake antec 200 
  hide details  
Reply
Escobar
(9 items)
 
Supercomputer ^_^
(13 items)
 
 
CPUMotherboardGraphicsRAM
1055T M4A88T-D EVO USB3 ATI 6850 4 GB 
Optical DriveOSMonitorKeyboard
DVD RW Windows 8 Pro lp1900 + 2 X 15 inch dell Microsoft Comfort Curve 
PowerCase
600watt thermaltake antec 200 
  hide details  
Reply
post #3 of 7
Quote:
Originally Posted by Ulquiorra View Post
Hmm theres a option in vsftp conf that will chmod on upload. Im doing the same at the moment, however as ive got virtual hosts im pointing to /home/X/www

local_umask=022 maybe what you need in /etc/vsftp.conf
Lol, you're that guy who won my D2 accounts a few years back

And yeah, you can either change the umask or the access policy for Samba
#well
(18 items)
 
Lenovo L530
(8 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7 4770k Gigabyte Z87X-UD4H Sapphire RX 580 Corsair CMX8GX3M2A2000C9 
Hard DriveOptical DriveCoolingOS
Samsung 840 EVO Generic DVD±RW Burner Noctua NH-D14 Windows 10 
MonitorMonitorKeyboardPower
Dell U2711 Samsung SyncMaster 2233 Ducky DK9008 Overclock.net Edition, Cherry MX B... Corsair TX850 
CaseMouseMouse PadAudio
Fractal Design Core 2500 Logitech G303 QPAD HeatoN L M-Audio Fast Track USB 
AudioAudio
Beyerdynamic DT-770 80 Ohm AntLion ModMic v3 
CPUGraphicsRAMRAM
Intel Ivy Bridge 3210M Intel HD 4000 Graphics Soldered Corsair Vengeance  
Hard DriveOptical DriveOSMonitor
500GB DVD-+RW Windows 7 Professional 1600x900 
  hide details  
Reply
#well
(18 items)
 
Lenovo L530
(8 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7 4770k Gigabyte Z87X-UD4H Sapphire RX 580 Corsair CMX8GX3M2A2000C9 
Hard DriveOptical DriveCoolingOS
Samsung 840 EVO Generic DVD±RW Burner Noctua NH-D14 Windows 10 
MonitorMonitorKeyboardPower
Dell U2711 Samsung SyncMaster 2233 Ducky DK9008 Overclock.net Edition, Cherry MX B... Corsair TX850 
CaseMouseMouse PadAudio
Fractal Design Core 2500 Logitech G303 QPAD HeatoN L M-Audio Fast Track USB 
AudioAudio
Beyerdynamic DT-770 80 Ohm AntLion ModMic v3 
CPUGraphicsRAMRAM
Intel Ivy Bridge 3210M Intel HD 4000 Graphics Soldered Corsair Vengeance  
Hard DriveOptical DriveOSMonitor
500GB DVD-+RW Windows 7 Professional 1600x900 
  hide details  
Reply
post #4 of 7
set up a different group/user to run the ftp server and move it's base folder somewhere. that would aid in security
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #5 of 7
Quote:
Originally Posted by gonX View Post
Lol, you're that guy who won my D2 accounts a few years back

And yeah, you can either change the umask or the access policy for Samba
D2? i cant remember my memory is that bad xD



Oh and also you may need to change the group of the files depending on how your apache + directory structure is set up, (if the user is part of the apache group then the files need not be 666 but 660 (is it that? ima new to this as well xD) hope ive helped a little bit )
Escobar
(9 items)
 
Supercomputer ^_^
(13 items)
 
 
CPUMotherboardGraphicsRAM
1055T M4A88T-D EVO USB3 ATI 6850 4 GB 
Optical DriveOSMonitorKeyboard
DVD RW Windows 8 Pro lp1900 + 2 X 15 inch dell Microsoft Comfort Curve 
PowerCase
600watt thermaltake antec 200 
  hide details  
Reply
Escobar
(9 items)
 
Supercomputer ^_^
(13 items)
 
 
CPUMotherboardGraphicsRAM
1055T M4A88T-D EVO USB3 ATI 6850 4 GB 
Optical DriveOSMonitorKeyboard
DVD RW Windows 8 Pro lp1900 + 2 X 15 inch dell Microsoft Comfort Curve 
PowerCase
600watt thermaltake antec 200 
  hide details  
Reply
post #6 of 7
Thread Starter 
That worked. It's just for internal use so that's really all that matters.
    
CPUMotherboardGraphicsRAM
E6300 @ 2.3 GHz Foxconn Intel x3100 4.5 Rendition 
Hard DriveOptical DriveOSMonitor
160+500 DVDRW Server 08 x64 Princeton 17'' square 
KeyboardPowerCaseMouse
Unicomp Germanic Model M 250W Dell Vostro 200 Gateway Ball Mouse 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
E6300 @ 2.3 GHz Foxconn Intel x3100 4.5 Rendition 
Hard DriveOptical DriveOSMonitor
160+500 DVDRW Server 08 x64 Princeton 17'' square 
KeyboardPowerCaseMouse
Unicomp Germanic Model M 250W Dell Vostro 200 Gateway Ball Mouse 
  hide details  
Reply
post #7 of 7
Quote:
Originally Posted by IBuyJunk View Post

That worked. It's just for internal use so that's really all that matters.

If the server gets an external IP it deosn't matter, somebody will scan the range and find out you screwed with the settings. If you still have anonymous log-in allowed it's no good, even then they might really like the /var/www permissions being tweaked by create a false user/account and have a go at your /var/www (root hacks always exist). Security is everything if the IP is external.
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Permissions issue with FTP to /var/www