LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 09-07-2003, 01:17 AM   #1
beatlelane
Member
 
Registered: Jun 2003
Location: Manila
Distribution: Bayanihan+RH9+FC1
Posts: 68

Rep: Reputation: 15
Lost permission on uploaded files


Hi guys!

I am new to Linux but I was able to have a box maybe ready for production...

But I have noticed when I tested, that uploading html files to VSFTP/Apache server lost all the permission of these files, …well, previously It has the same files and I already chmoded the directories (754) and files (744)…after the upload other users has no read privilege on those files.

How do I eliminate these permission problems?, I don’t want to chmoding these files every time there are updates, well of course, it was obvious this is too hard for us administrators to have this kind of solution right?

Thank you!
 
Old 09-09-2003, 04:33 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
1. What client do you use to upload those files?
2. What is the username and the umask of the user you upload those files as?
3. Are these files uploaded on a regular basis and do they need to be updated manually?
- Any other details that might help, like the nature of the files, what their purpose is etc etc.
Btw, you say the files have octal 0744 permissions, you mean 0755 or 0644?..
 
Old 09-09-2003, 08:29 PM   #3
beatlelane
Member
 
Registered: Jun 2003
Location: Manila
Distribution: Bayanihan+RH9+FC1
Posts: 68

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by unSpawn
1. What client do you use to upload those files?
2. What is the username and the umask of the user you upload those files as?
3. Are these files uploaded on a regular basis and do they need to be updated manually?
- Any other details that might help, like the nature of the files, what their purpose is etc etc.
Btw, you say the files have octal 0744 permissions, you mean 0755 or 0644?..
Hi guys good morning!

1. What client do you use to upload those files?

* we used msdos ftp and perhaps will use other windows (GUI) ftp software later.

2. What is the username and the umask of the user you upload those files as?

* they are regular (local) users of the system…I haven’t read umask yet…but I think default umask will be applied.


3. Are these files uploaded on a regular basis and do they need to be updated manually?

* files/documents are used to or need to be updated dynamically…without, in its nature, no administrator intervention…well users or depositor should manually upload those files remotely.

- Any other details that might help, like the nature of the files, what their purpose is etc etc.
Btw, you say the files have octal 0744 permissions, you mean 0755 or 0644?..

* these published documents are executables (cgi, scipts etc.) and regular htmls intend for public consumption (web).

* octal yes, I initially assigned 0755 permission for their individual “/HTML” directories under their individual /home folders. And i assigned permission (chowned) so that they become the owner of these HTML directories.


I just want to know and it was not clear to me is this, Is that permission on these directories (/html) applied automatically or that permission should be inherited for whatever files you copied to that directory?

Anyway, thanks Unspawn for your prompt response!
 
Old 09-10-2003, 08:20 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
* they are regular (local) users of the system I havent read umask yet but I think default umask will be applied.
Umask should be in /etc/profile or etc/bashrc, else in a Bash/Sh shell of one of them accounts typing "umask" shows you the value. Octal umask 022 translates to dirs being given 0755 and files 0644 access permission.

I just want to know and it was not clear to me is this, Is that permission on these directories (/html) applied automatically or that permission should be inherited for whatever files you copied to that directory?
In essence inherited according to umask, but usually overridden by the ftp daemons' umask handling. Btw, if those users have a local account w. login shell, are you sure you need it?
 
Old 09-10-2003, 08:38 PM   #5
beatlelane
Member
 
Registered: Jun 2003
Location: Manila
Distribution: Bayanihan+RH9+FC1
Posts: 68

Original Poster
Rep: Reputation: 15
Good Morning!

Unspawn, after i have read your post i jumped right away to dig up some info about user mask, and now I got this one clear up. THANKS!

*In essence inherited according to umask, but usually overridden by the ftp daemons' umask handling. Btw, if those users have a local account w. login shell, are you sure you need it?*

But this ftp daemon that you have said confused me, well I didn’t get it right though I will try anyway.
Did you mean that if my local users upload files to the VSFTP server that has a default umask of 033 it doesn’t mean that those uploaded files have a 0744 (octal) permission? If the ftp daemon has umask to be configured, where should I modify this, on client end or on the server?

With regards to my local users, I consider them not familiar with linux or using any shell command I just want them to have individual account/folders for uploading, maybe will train them later on.

Just setup the basic configuration, and was obvious that I am not good with some other options like virtual user and system manipulation and I don’t want to experiment at this time, all I have is a working system.

Again thanks.
 
Old 09-11-2003, 02:36 AM   #6
beatlelane
Member
 
Registered: Jun 2003
Location: Manila
Distribution: Bayanihan+RH9+FC1
Posts: 68

Original Poster
Rep: Reputation: 15
Problem SOLVED!

Thank you very very much sir Unspawn for your kindness.

i was able to get the result i want. just going along with your instructions below. i changed local umask and ftpd server umask accordingly.

Quote:
Originally posted by unSpawn
Umask should be in /etc/profile or etc/bashrc, else in a Bash/Sh shell of one of them accounts typing "umask" shows you the value. Octal umask 022 translates to dirs being given 0755 and files 0644 access permission.

In essence inherited according to umask, but usually overridden by the ftp daemons' umask handling
[i
again thank you!
 
  


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
vsftpd uploaded files owned by group? fredriksk Linux - Software 1 10-17-2005 08:48 AM
Re: Vsftpd uploaded files Permissions silver05 Linux - Software 2 09-30-2005 08:22 AM
video encoding from uploaded files dtra Linux - Software 5 04-14-2005 01:05 AM
Uploaded Files permissions (proftpd) Wynand1 Linux - Security 1 01-28-2005 03:32 AM
Renaming files as they are uploaded Cr4wford Linux - Software 1 04-26-2004 03:41 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration