JRA
Members-
Posts
952 -
Joined
-
Last visited
Content Type
Forums
News
20th
EduGeek EDIT Conference
Blogs
Everything posted by JRA
-
Okay had a bash with that, modified it slightly thus: root@compsci:/compscihomes/tkid3# setfacl -Rdm g:www-data:rwx /compscihomes/ root@compsci:/compscihomes/tkid3# getfacl /compscihomes/tkid3/public_html/ getfacl: Removing leading '/' from absolute path names # file: compscihomes/tkid3/public_html/ # owner: james # group: www-data user::rwx user:root:rwx user:domain\040admins:rwx user:james:rwx user:tkid3:rwx group::--- group:domain\040admins:rwx group:staff:--- group:tkid3:rwx mask::rwx other::rwx default:user::rwx default:user:root:rwx default:user:domain\040admins:rwx default:user:james:rwx default:user:tkid3:rwx default:group::--- default:group:www-data:rwx default:group:domain\040admins:rwx default:group:staff:--- default:group:tkid3:rwx default:mask::rwx default:other::r-- Still get forbidden.
-
Ta! Okay, tried that but still forbidden visiting http://compsci/~tkid3/file.html Thanks! Had a bash but get "usermod: user 'tkid3' does not exist in /etc/passwd" even though getent passwd does spit them out (domain account.) I've been getting the following similar thing in error.log: [Mon Oct 23 14:49:29.363574 2017] [core:error] [pid 2119] (13)Permission denied: [client 10.108.5.162:64272] AH00035: access to /~tkid3/file.html denied (filesystem path '/compscihomes/tkid3/public_html') because search permissions are missing on a component of the path Which is daft because permissions are wide open.
-
Oh now THIS is interesting... Tailing error.log still, comes up with the following: [Mon Oct 23 13:24:45.054456 2017] [authz_core:error] [pid 2359] [client 10.108.5.162:63212] AH01630: client denied by server configuration: /home/year10/tkid3/public_html Now that's not where I want that, should be (as I'm sure we're all painfully aware by now) in /compscihomes/%kidname%/public_html What pesty old bit of Linux is steering that I wonder?
-
If it's any help, if I change the "denied" to "granted" in apache2.conf for the root dir I get "not found" rather than "denied" - as in, this bit: Options FollowSymLinks AllowOverride None Require all denied In fact, that whole section looks like: Options FollowSymLinks AllowOverride None Require all denied AllowOverride None Require all granted Options Indexes FollowSymLinks AllowOverride None Require all granted # # Options Indexes FollowSymLinks # AllowOverride None # Require all granted # Options Indexes FollowSymLinks MultiViews AllowOverride None Require all granted Any clues? Also, any merit in commenting out the "AccessFileName .htaccess" section or no?
-
Hi there - yes it's a proper head-scratcher! I do appreciate the help though hugely from both of you. Output is: root@compsci:/etc/apache2/mods-available# namei -l /compscihomes/tkid3/public_html f: /compscihomes/tkid3/public_html drwxr-xr-x root root / drwxrwxrwx root www-data compscihomes drwxrwxrwx james www-data tkid3 drwxrwxrwx root www-data public_html
-
Thanks folks. Apache didn't start as it didn't like the "+" option in userdir.conf now; says they all needed to start with a "+" or "-" or none of them. Removed the "+" and back to the same, forbidden still on http://compsci/~tkid3/ but the phpmyadmin page works. Again, cheers very very much fro sticking with me!
-
Thanks! Ooh now that has done something. Making that example my own userdir.conf (and changing only the directory line to say ) then Apache seems to not restart nicely (# service apache2 restart) with: Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details. The web server then doesn't work; not this test kid's page not the phpmyadmin page of the MySQL part of it (which I generally keep open alongside to sanity check it still actually servers web pages.) Is that a clue to anything? - - - Updated - - - Ah yes, usually do with # service apache2 restart after any change but more often than not restart the whole server.
-
Ah, now on running that setsebool command, I got "The program 'setsebool' is currently not installed. You can install it by typing: apt install policycoreutils" but I figured I wouldn't need to as I'm on Ubuntu server. Do I need to install those utils then run that jobber? Thanks again! You're becoming my hero.
-
Thanks HUGELY for sticking with me! Okay, done all that and get Forbidden 403 still. The userdir.conf now looks like: UserDir /compscihomes/*/public_html UserDir disabled root AllowOverride None Options Indexes FollowSymLinks Require all granted Allow from all # # Require all granted # # vim: syntax=apache ts=4 sw=4 sts=4 sr noet Everything from /compscihomes down (including that folder itself) is 777, with www-data as owning group on everything. Added the following section into apache2.conf for good measure: Options Indexes FollowSymLinks AllowOverride None Require all granted Though that doesn't seem to do anything either. Tailing the apache error log gets me these though: [Mon Oct 23 10:51:25.330781 2017] [core:error] [pid 2718] (13)Permission denied: [client 10.108.5.162:51219] AH00035: access to /~tkid3/public_html/file.html denied (filesystem path '/compscihomes/tkid3/public_html') because search permissions are missing on a component of the path But they're all 777. At least with the Unix ACLs, could this be Samba doing something? Home directories (/compscihomes/%username%) all got the "drwxrwxrwx+" as ACLs. Uuurgh! Pesty rotten smegging thing. Also yes I had added those symlinks in.
-
Thanks yet again - gave that a stab. Just to clarify, the little home areas are eg /compscihomes/tkid3/ they're not eg /home/compscihomes/tkid3/ Currently, I've chmod-ed everything wide open (as in chmod -R 777 /compscihomes) and userdir.conf looks like: UserDir /compscihomes/*/public_html UserDir disabled root AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Require all granted Require all denied # vim: syntax=apache ts=4 sw=4 sts=4 sr noet The file I'm after is in /compscihomes/tkid3/public_html/file.html Just in case I've got anyone tangled up back there. But yes, still not got it.
-
Thanks again both! Gosh lots of people helping with Apache for a Friday afternoon... Cheers all. Okay, tinkering with the permissions didn't seem to do it; tkid3/ and all below is 777 now. I also changed the folder in userdir.conf to specifically look for /public_html (and then made the folder public_html) as it was just set to look for /compsci/tkid3/sites/file.html, still no joy. That should work though I'd have thought. Checking apache's error.log though I get a lot of the following: [Fri Oct 20 15:47:04.774653 2017] [core:error] [pid 1058] (13)Permission denied: [client 10.108.5.162:59251] AH00035: access to /~tkid3/file.html denied (filesystem path '/compscihomes/tkid3') because search permissions are missing on a component of the path Anything to go on?
-
Thanks both! Url is: http://compsci/~tkid3/file.html I get: Forbidden You don't have permission to access /~tkid3/file.html on this server. Apache/2.4.18 (Ubuntu) Server at compsci Port 80 I chmod-ed that wide open too, but still get the same. I also get similar if I put in some nonsense url eg: http://compsci/~tkid3/toilet.html Thanks though everyone for the hand-holding!
-
Cheers! Okay done that, still not sure I've got it. userdir.conf is as follows: UserDir /compscihomes/*/public_html UserDir disabled root AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Require all granted Require all denied # vim: syntax=apache ts=4 sw=4 sts=4 sr noet I've tried with and without making a /public_html folder in the new little home areas, trying to use the 'site' folder or not, but getting 403 errors still. Even if there's no file in there at all, and no matter what folder I seem to steer that to. Feels like I'm getting near though!
-
Okay, I *think* I'm getting close! I cannot for the life of me set up 'per user' sites with Apache2 on my little compsci server for the punters. I mean kiddies. Followed this decent-looking guide HERE but still not there, getting "403 Forbidden" on the student account. In a nutshell, the students doing the assessment will be given a 'second' little home area in which to do their thing. In this second home area, they should be instructed to make a folder called 'site' (or I could script that, I might.) In there, all the website things will go, as well as a file called "file.html" which I'm using for my test account. Their home areas aren't in /homes, rather in /compscihomes/username/ - this is all fine in Samba and seems to deploy ok at logon as X: apache2.conf looks like this: # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See http://httpd.apache.org/docs/2.4/ for detailed information about # the directives and /usr/share/doc/apache2/README.Debian about Debian specific # hints. # # # Summary of how the Apache 2 configuration works in Debian: # The Apache 2 web server configuration in Debian is quite different to # upstream's suggested way to configure the web server. This is because Debian's # default Apache2 installation attempts to make adding and removing modules, # virtual hosts, and extra configuration directives as flexible as possible, in # order to make automating the changes and administering the server as easy as # possible. # It is split into several files forming the configuration hierarchy outlined # below, all located in the /etc/apache2/ directory: # # /etc/apache2/ # |-- apache2.conf # | `-- ports.conf # |-- mods-enabled # | |-- *.load # | `-- *.conf # |-- conf-enabled # | `-- *.conf # `-- sites-enabled # `-- *.conf # # # * apache2.conf is the main configuration file (this file). It puts the pieces # together by including all remaining configuration files when starting up the # web server. # # * ports.conf is always included from the main configuration file. It is # supposed to determine listening ports for incoming connections which can be # customized anytime. # # * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/ # directories contain particular configuration snippets which manage modules, # global configuration fragments, or virtual host configurations, # respectively. # # They are activated by symlinking available configuration files from their # respective *-available/ counterparts. These should be managed by using our # helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See # their respective man pages for detailed information. # # * The binary is called apache2. Due to the use of environment variables, in # the default configuration, apache2 needs to be started/stopped with # /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not # work with the default configuration. # Global configuration # # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the Mutex documentation (available # at ); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # #ServerRoot "/etc/apache2" # # The accept serialization lock file MUST BE STORED ON A LOCAL DISK. # Mutex file:${APACHE_LOCK_DIR} default # # PidFile: The file in which the server should record its process # identification number when it starts. # This needs to be set in /etc/apache2/envvars # PidFile ${APACHE_PID_FILE} # # Timeout: The number of seconds before receives and sends time out. # Timeout 300 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive On # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 5 # These need to be set in /etc/apache2/envvars User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} # # HostnameLookups: Log the names of clients or just their IP addresses # e.g., www.apache.org (on) or 204.62.129.132 (off). # The default is off because it'd be overall better for the net if people # had to knowingly turn this feature on, since enabling it means that # each client request will result in AT LEAST one lookup request to the # nameserver. # HostnameLookups Off # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a # container, that host's errors will be logged there and not here. # ErrorLog ${APACHE_LOG_DIR}/error.log # # LogLevel: Control the severity of messages logged to the error_log. # Available values: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the log level for particular modules, e.g. # "LogLevel info ssl:warn" # LogLevel warn # Include module configuration: IncludeOptional mods-enabled/*.load IncludeOptional mods-enabled/*.conf # Include list of ports to listen on Include ports.conf # Sets the default security model of the Apache2 HTTPD server. It does # not allow access to the root filesystem outside of /usr/share and /var/www. # The former is used by web applications packaged in Debian, # the latter may be used for local directories served by the web server. If # your system is serving content from a sub-directory in /srv you must allow # access here, or in any related virtual host. Options FollowSymLinks AllowOverride None Require all denied AllowOverride None Require all granted Options Indexes FollowSymLinks AllowOverride None Require all granted # # Options Indexes FollowSymLinks # AllowOverride None # Require all granted # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # Require all denied # # The following directives define some format nicknames for use with # a CustomLog directive. # # These deviate from the Common Log Format definitions in that they use %O # (the actual bytes sent including headers) instead of %b (the size of the # requested file), because the latter makes it impossible to detect partial # requests. # # Note that the use of %{X-Forwarded-For}i instead of %h is not recommended. # Use mod_remoteip instead. # LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent # Include of directories ignores editors' and dpkg's backup files, # see README.Debian for details. # Include generic snippets of statements IncludeOptional conf-enabled/*.conf # Include the virtual host configurations: IncludeOptional sites-enabled/*.conf # vim: syntax=apache ts=4 sw=4 sts=4 sr noet # ADDED BY ME FOR HOMEDIR APACHE: # Include httpd-userdir.conf #ADDED BY ME TO ACTUALLY GET HTTPD.CONF IN AND WORKING LIKE THE TUTORIALS SAY: # Include /etc/apache2/httpd.conf .../mods-enabled/userdir.conf is: UserDir public_html UserDir disabled root AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Require all granted Require all denied # vim: syntax=apache ts=4 sw=4 sts=4 sr noet .../mods-available/php7.0.conf looks like: SetHandler application/x-httpd-php SetHandler application/x-httpd-php-source # Deny access to raw php sources by default # To re-enable it's recommended to enable access to the files # only in specific virtual host or directory # Require all denied <-- WAS this, commented it out and put in the next two lines Order Deny,Allow Deny from all # Deny access to files without filename (e.g. '.php') # Require all denied <-- I also edited this out, and put in the next two lines: Order Deny,Allow Deny from all # Running PHP scripts in user directories is disabled by default # # To re-enable PHP in user directories comment the following lines # (from to .) Do NOT set it to On as it # prevents .htaccess files from disabling it. # I ALSO COMMENTED OUT ALL THE FOLLOWING TO THE END: # # # php_admin_flag engine Off # Anyone got any ideas what I'm doing? Very grateful indeed for any pointers at this stage!
-
I'd make them all do something useful in html for a little while. Maybe some php, and maybe a nod towards WordPress (which seemingly runs the internet) and yeah even Dreamweaver. But I'm clearly not visionary/drunk enough to work for OCR and come up with this garbage. - - - Updated - - - Hi - yeah it does have to be MySQL and Dreamweaver.
-
Ooh this is good, this is good! Just so I've got this straight (and to confirm in case anyone else is watching and desperate) an approach in the single-server scenario would be: - Ubuntu server with MySQL set up the way we did back in the day. - Get Samba, winbind, Apache on it. Samba and winbind for a share for each punter, Apache for the php support. Probably already done php/web parts if going through the previous. - Do the php bit and MySQL bit in Dreamweaver on Windows classroom client as per these instructions. That hold water or have I still got it poopy? Thanks to you all so much for the spoon-feeding!
-
Okay, I don't know if I'm missing things here, but I'm quite new to all of this. I might be far in over my head already. If anyone's reading who can steer me right I'd definitely appreciate it! So, I'm opening Dreamweaver on a PC. MySQL server is a Ubuntu server. I don't seem able to get anything php-related to work. As in, not in Dreamweaver nor if I just stick php functions in text/.html files and open them in Chrome or Firefox. Is this because I don't have php installed on this PC? I'm fairly sure I don't, but if so, has anyone got 'set up' for this new controlled assessment? Would an approach for it be to give the students a login to the server itself, a home area, install php on that and do *something*? Gosh I really am tangled here. :/ Thanks for any and all assistance.
