By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,688 Members | 1,212 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,688 IT Pros & Developers. It's quick & easy.

Permissions in over my head and really needing some help

100+
P: 170
Hello everyone,

I'm not sure if this is the correct forum for this, and apologies for the length of this question, but I'm desperate for some good advice...

I'm in way over my head with file permissions. The directory and files are sitting on a linux server. I know almost nothing about linux.

The background: I was given a web share by my IT admin. Initially, the web share had 3 users, myself (as the owner) ,root (the group) and everyone. I could copy and paste from my local folder to the web share when at work no problem. But I needed to be able to upload files from home over the web. Whatever the permissions were originally set to, wouldn't let me. So I changed permissions to five Full Control to "everyone", which let me upload. So now, "myself" and "everyone" have Full Control and "root" has partial control.

I then found a webadmin file which listed directory contents etc via the web and allowed me to upload, delete, view etc the files in my directories. I have noticed now that when I copy/paste files as originally, the file permission is set to 764 and the owner is set as "myself", which I assume is correct. But, when I upload the same file using the webadmin via the web, the file permission is set to 644 (according to the settings within the webadmin file) and the owner becomes "www-data".

Also, I notice that on the webadmin, any file that has permissions set as 600,755 or 644 allows me to change those permissions, but any file whose permissions are 764 will not allow me to change those permissions.

I am really confused and worried. My questions, in order of importance:

1) Have I massively compromised the security of my files by changing "everyone" permission to full control?

2) What should my directories and files have permissions set to in order to allow me to upload over the web but not compromise security?

3) For my directory, I assume the "myself" group should have full control. How much control should the other groups have?

4) Why are the permissions of the 764 not changeable but the 600,755 and 644 are?

5) When I upload a file via the web, why does the owner change to "www-data"?

If anyone could possibly spare the time to help me out, I would really be grateful. Thanks.
Jun 17 '08 #1
Share this Question
Share on Google+
1 Reply

Nepomuk
Expert 2.5K+
P: 3,112
Hi! I don't know, if this is still an issue, but I thought I'd answer those of your questions that I can answer.
1) Have I massively compromised the security of my files by changing "everyone" permission to full control?
Probably, yes.
2) What should my directories and files have permissions set to in order to allow me to upload over the web but not compromise security?
Ideally I would say, no access to your directories at all, but reading access will possibly be vital. So use
Expand|Select|Wrap|Line Numbers
  1. chmod o-xw *
to allow the "others" to only read those files.
3) For my directory, I assume the "myself" group should have full control. How much control should the other groups have?
Check my answer to 2).
4) Why are the permissions of the 764 not changeable but the 600,755 and 644 are?
I don't understand that - as far as I understand the modes, 764 should mean:
7 = the owner have reading, writing and execution access
6 = the owning group has reading and writing access
4 = the others have reading access
As long as that file belongs to you (check with ls -l), it should work.
5) When I upload a file via the web, why does the owner change to "www-data"?
That's the user running the web service. As this user "creates" the files on the server, he's the owner.

There, I hope that helps a bit.

Greetings,
Nepomuk
Aug 27 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.