Jump to content

user's uploads arent viewable


Guest ion
 Share

Recommended Posts

Whenever I sftp into my box as a normal user and upload somthing to var/www/html/ I can't view it from the web, even if i go directly to it.

The only way it works correctly is when i sftp in as root, which I'm not comforable doing. I'm totally stumped because i have never seen this restriction on any other distro...

also is there any way to enable web visitors to look at a directory's contents? I get the permission denied error when trying this.

any help would be appreciated?

Link to comment
Share on other sites

Guest davebsr

First off, you're running apache, right? Ok, good.

 

Secondly. Check those file permissions! I bet the files you're uploading aren't world readable unless you login as root.

 

Check that. You can set the default umask to be anything you want. Umask is the default permssions a user's created things are set to-so if i create file the umask set's it's permissions. Make sense? If you knew all this, ignore me.

 

Ok! if you want to set your permissions, go to /etc/profile, and search for "umask". Now, Here's the trick - it's backwards. So if you want permissions of 777 (user+rwe, group+rwe, all+rwe), you have to set the umask to 000. If you have no idea what I mean about file permissions, keep asking and hopefully someone will answer.

 

Finally. What's wrong with sftp'ing as root? SSH is about as secure as it being your own private network...I haven't seen a packet sniffer yet that could break it. Or is there something I don't know?

Link to comment
Share on other sites

hmm, that didnt really seem to make any difference.

I wonder why mandrake does this by default, every other distro will let other users content be shown from the web, i have made sure that the user is the owner.

You are right about the files not being raedable unless root uploaded them. the reason users other than root need to upload is because i have other users that upload stuf, that i dont want to have root access.

Any other ideas on this?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...