## WeBWorK Main Forum

### Forbidden You don't have permission to access this resource.

by Eric Stroyan -
Number of replies: 20

Whenever I try to create or modify a problem set I am getting the 403 error

# Forbidden

You don't have permission to access this resource.

I don't know if this is the result of changing mysqldump to use the  --no-tablespaces option or not.

Any help would be appreciated

### Re: Forbidden You don't have permission to access this resource.

by Eric Stroyan -
I tried

chmod -R g+w DATA ../courses htdocs/tmp htdocs/applets logs tmp /opt/webwork/pg/lib/chromatic
find DATA/ ../courses/ htdocs/tmp logs/ tmp/ -type d -a -exec chmod g+s {} \;
exit

With no change.

### Re: Forbidden You don't have permission to access this resource.

by Michael Gage -

mysqldump shouldn't modify the database itself.

it does look like  a permissions problem.

who owns the files in the courses directory?  I usually make this the webrowser to avoid permission hassles

you should be able to reach the top level of your site without problems (where it lists the problems)

since that doesn't use the database .

You are saying that you only have a problem once you try to edit?

### Re: Forbidden You don't have permission to access this resource.

by Michael Gage -
what does
ls -l courses

look like-- ?

### Re: Forbidden You don't have permission to access this resource.

by Eric Stroyan -

I am able to create problem sets and add problems, just not edit problems that I had input. That's when the error show up. I am able to remove problems from a set.

### Re: Forbidden You don't have permission to access this resource.

by Eric Stroyan -

### Re: Forbidden You don't have permission to access this resource.

by Eric Stroyan -

Here is ls -al of the courses

### Re: Forbidden You don't have permission to access this resource.

by Eric Stroyan -
I tried adding problem sets and problems, removing problems from a number of differently owned courses. All the same result. Could add a set, add problems, delete problems, but not edit a problem. I did not try with any of the library problems, though.

### Re: Forbidden You don't have permission to access this resource.

by Michael Gage -

I suggest

sudo chown -R wwdata courses

This will make all of the files in courses owned by wwdata which is the webserver. (The -R stands for recursive.)

Your chmod fix only changed the permissions on the toplevel  of courses and wwdata needs access to files within courses.

### Re: Forbidden You don't have permission to access this resource.

by Eric Stroyan -

Thanks. I'll try that. I should know better.

### Re: Forbidden You don't have permission to access this resource.

by Eric Stroyan -

sudo chown -R wwdata courses gave 'invalid user'

I changed that to sudo chown -R www-data, which ran, restarted apache2 and I still am not able to edit problems

getting

Forbidden message

### Re: Forbidden You don't have permission to access this resource.

by Danny Glin -
A few thoughts:
• Can you save a new problem in one of these courses?  e.g. if you edit  a Library problem and "save a new version", does that work?
• Check the permissions on the individual problems.  Though I doubt it, it's possible that the user doesn't have RW permission.
• Is this running on a Red Hat flavour of linux?  If so, then SElinux could be the culprit.  It has the ability to override file permissions to block files.

### Re: Forbidden You don't have permission to access this resource.

by Eric Stroyan -

The system is ww2.12/pg2.12 running on Ubuntu 16.04

permissions on individual problems -rw-rw-r-- owner www-data group wwdata

I tried copying a problem, still get error.

I tried writing a problem on another machine and downloading it, error. There is another instructor reporting

"Yes, it's the 403 Forbidden error. It happened in two different spots.

1) When hitting the "next page" button when viewing through problems in the Library Browser
2) When looking at the class editor page, I clicked the button to sort the roster by section"

I'm sorry , but I'm not sure what I should be looking for with browser developer tools and unclear what I should look for in the apache logs.

### Re: Forbidden You don't have permission to access this resource.

by Nathan Wallach -
Maybe check in the browser developer tools exactly what URL is triggering the 403 error, and try to check in the Apache logs if something relevant shows up. It could be that some JavaScript file or something else is the culprit.

### Re: Forbidden You don't have permission to access this resource.

by Michael Gage -
in chrome the browser tools are under View->Developer->Developer tools
on firefox they are under Tools ->Tools->Web developer->toogle tools

one of the tabs will show you some error messages such as 403 errors -- unable to connect
see what the url is for the connection that fails -- is it the same exactly as the url of your server?