
Posted: 10/1/2011 1:42:54 PM EST
So I setup Ubuntu on a spare box I have lying around so my wife and I can work on the website for our future farm. Have apache up and running as well as vsftpd for FTP. Got the site files uploaded, but they are not viewable. The permissions are setup so only the wwwdata user can read the files, and therefore none of the site can be viewed. What do I need to change to make them globally viewable. Keep in mind Ubuntu doesn't have a root user so I have to sudo everything (pain in the ASS).
|
|
|
Nobody? Switched to ProFTPD since it has a GUI admin tool. Reuploaded site, still getting 403 error.
|
|
|
Originally Posted By Keymaster4225:
... Keep in mind Ubuntu doesn't have a root user so I have to sudo everything (pain in the ASS). sudo passwd newrootpassword newrootpassword su root newrootpassword you are now root |
|
|
Originally Posted By kelone:
Originally Posted By Keymaster4225:
... Keep in mind Ubuntu doesn't have a root user so I have to sudo everything (pain in the ASS). sudo passwd newrootpassword newrootpassword su root newrootpassword you are now root Fail Correct command: sudo su - |
|
"Laws are no longer made by a rational process of public discussion; they are made by a process of blackmail and intimidation, and they are executed in the same manner"
|
You need to set an appropriate umask in vsftpd.conf 022 is what you want
That "masks" out the write permission Read=4, Write=2, eXecute=1 7 is rwx The mask is opposite... 0 means don't mask anything. 2 says mask out write, so you're left with r-x, or 5 |
|
|
Originally Posted By kelone:
Originally Posted By Keymaster4225:
... Keep in mind Ubuntu doesn't have a root user so I have to sudo everything (pain in the ASS). sudo passwd newrootpassword newrootpassword su root newrootpassword you are now root Any help with my file permission errors? |
|
|
If you are talking about file premission, then
chmod -R a+r /path/to/wwwdata/* will let everyone read all files in all subdirs There is a bunch of stuff in the apache setup file (I forget name/where it is), and I am pretty sure I had to mess with those setting for a while to get it working |
|
|
Ubuntu does indeed have a root user and allen told you how to become it
![]() |
|
Originally Posted By FLAL1A:
Are you angered by the fact that my wife is beautiful, while yours is the sort of person who married a guy like you? |
wwwdata is the correct user. You have some other problem. logs?
Also, you have a uid0. |
|
Democrats like five of the ten amendments in the Bill of Rights. Republicans like the other five. Libertarians like all ten. - mtk
|
Originally Posted By Keymaster4225:
Keep in mind Ubuntu doesn't have a root user so I have to sudo everything (pain in the ASS). You want to sudo things that require root. It's supposed to be a bit of a PITA. |
|
|
As for the OP.
Adjust your ftp client to set permissions to world readable after the upload (permissions rwxr-xr-x, aka 755). If this doesn't work, make sure that SITE_CHMOD isn't disabled in the ftp server. Whatever you do, do NOT change the ftp daemon to upload the stuff as the wwwdata user; this will mean any bug or hole in the webserver or code running on it will allow files to be modified/compromised or deleted. Just get the permissions right. |
|
"Laws are no longer made by a rational process of public discussion; they are made by a process of blackmail and intimidation, and they are executed in the same manner"
|
Originally Posted By allenNH:
Originally Posted By kelone:
Originally Posted By Keymaster4225:
... Keep in mind Ubuntu doesn't have a root user so I have to sudo everything (pain in the ASS). sudo passwd newrootpassword newrootpassword su root newrootpassword you are now root Fail Correct command: sudo su - How is it fail? It let him set the root password, and now he can log in as root and not fuck about with sudo |
|
|
Originally Posted By Keymaster4225:
So I setup Ubuntu on a spare box I have lying around so my wife and I can work on the website for our future farm. Have apache up and running as well as vsftpd for FTP. Got the site files uploaded, but they are not viewable. The permissions are setup so only the wwwdata user can read the files, and therefore none of the site can be viewed. What do the web server logs say? I'm guessing 'wwwdata' is the user the web server runs is, so that's the only user that needs read permissions. The web server config may be blocking at the .htaccess level |
|
|
Originally Posted By kelone:
Originally Posted By allenNH:
Originally Posted By kelone:
Originally Posted By Keymaster4225:
... Keep in mind Ubuntu doesn't have a root user so I have to sudo everything (pain in the ASS). sudo passwd newrootpassword newrootpassword su root newrootpassword you are now root Fail Correct command: sudo su - How is it fail? It let him set the root password, and now he can log in as root and not fuck about with sudo "fucking about with sudo" is The Right Way(tm). And of course you mean su to root, not login. If you're logging in remotely as root you're fucking up big time. |
|
"Laws are no longer made by a rational process of public discussion; they are made by a process of blackmail and intimidation, and they are executed in the same manner"
|
Originally Posted By kelone:
Originally Posted By allenNH:
Originally Posted By kelone:
Originally Posted By Keymaster4225:
... Keep in mind Ubuntu doesn't have a root user so I have to sudo everything (pain in the ASS). sudo passwd newrootpassword newrootpassword su root newrootpassword you are now root Fail Correct command: sudo su - How is it fail? It let him set the root password, and now he can log in as root and not fuck about with sudo Without the - you do not inherit root's environment But "just log in as root" is a TERRIBLE idea. Find and fix the problem. Running as "root" is why Windows systems are so readily cracked. A lot of the issues people have with Windows, they wouldn't have if they ran as a regular user and only logged in with administrative privileges when necessary. |
|
|
Ok, got the root stuff taken care of. The /var/www directory is world-readable, and I can now view files on the site, but for some reason it isn't loading Index.html when I plug in the website to a browser. It just shows a dir listing. ALSO, when I click on index.html, it's not showing and graphics/formatting/etc just text and a few links. Gah. I'm about to go back to Win7 and run Apache off of that. LOL.
ETA: Ok, got the permissions straightened out completely, site will display completely, EXCEPT, it's still dir listing instead of loading index.html. WTF apache. |
|
|
Originally Posted By Keymaster4225:
Ok, got the root stuff taken care of. The /var/www directory is world-readable, and I can now view files on the site, but for some reason it isn't loading Index.html when I plug in the website to a browser. It just shows a dir listing. ALSO, when I click on index.html, it's not showing and graphics/formatting/etc just text and a few links. Gah. I'm about to go back to Win7 and run Apache off of that. LOL. In your apache config you need to set DirectoryIndex to include index.html A common statement for that, for php users, is: DirectoryIndex index.php index.html index.htm ETA: While your at it, disable that file listing stuff entirely. Look for "Indexes" or "+Indexes" in Option and Directory blocks, remove it wherever you find it. Just a security breach waiting to happen. |
|
"Laws are no longer made by a rational process of public discussion; they are made by a process of blackmail and intimidation, and they are executed in the same manner"
|
AR15.COM is the world’s largest firearm community and is a gathering place for firearm enthusiasts of all types.
From hunters and military members, to competition shooters and general firearm enthusiasts, we welcome anyone who values and respects the way of the firearm.
Subscribe to our monthly Newsletter to receive firearm news, product discounts from your favorite Industry Partners, and more.
Copyright © 1996-2019 AR15.COM LLC. All Rights Reserved.
Any use of this content without express written consent is prohibited.
AR15.Com reserves the right to overwrite or replace any affiliate, commercial, or monetizable links, posted by users, with our own.