NetBeans "Cannot lock read only error"
Discussion
It says the file is read only, so do you have ownership of said file(s) and folder(s)?
This assumes you are developing as a non privileged user.
If the files reside in a web folder (e.g. /var/www), then the owner is likely to be www-data.
You could add your username to the www-data group, and then ensure that all files have 664 and folders 775 permissions.
To add yourself to the group (off the top of my head) gpasswd -a <username> <groupname>
NOTE - if this is a production server - DO NOT DO THIS!!
If it's just your own dev box then it's fine.
It could also be apparmor causing this.
Are you running apparmor?
Again, if this is NOT a production machine - you can simply disable and remove apparmor.
AppArmor can be disabled or removed as follows:
Disable AppArmor using the following commands:
Then, restart the server.
Remove the apparmor package with your package manager:
apt-get remove apparmor
^^^ stupid forum won't let me add a second batch of code tags.
This assumes you are developing as a non privileged user.
If the files reside in a web folder (e.g. /var/www), then the owner is likely to be www-data.
You could add your username to the www-data group, and then ensure that all files have 664 and folders 775 permissions.
To add yourself to the group (off the top of my head) gpasswd -a <username> <groupname>
NOTE - if this is a production server - DO NOT DO THIS!!
If it's just your own dev box then it's fine.
It could also be apparmor causing this.
Are you running apparmor?
Again, if this is NOT a production machine - you can simply disable and remove apparmor.
AppArmor can be disabled or removed as follows:
Disable AppArmor using the following commands:
# /etc/init.d/apparmor stop
# /etc/init.d/apparmor teardown
# update-rc.d -f apparmor remove
Then, restart the server.
Remove the apparmor package with your package manager:
apt-get remove apparmor
^^^ stupid forum won't let me add a second batch of code tags.
Edited by TonyRPH on Friday 24th March 11:36
TonyRPH said:
It says the file is read only, so do you have ownership of said file(s) and folder(s)?
This assumes you are developing as a non privileged user.
If the files reside in a web folder (e.g. /var/www), then the owner is likely to be www-data.
You could add your username to the www-data group, and then ensure that all files have 664 and folders 775 permissions.
To add yourself to the group (off the top of my head) gpasswd -a <username> <groupname>
NOTE - if this is a production server - DO NOT DO THIS!!
If it's just your own dev box then it's fine.
It could also be apparmor causing this.
Are you running apparmor?
Again, if this is NOT a production machine - you can simply disable and remove apparmor.
AppArmor can be disabled or removed as follows:
Disable AppArmor using the following commands:
Then, restart the server.
Remove the apparmor package with your package manager:
apt-get remove apparmor
^^^ stupid forum won't let me add a second batch of code tags.
Thanks for the help, but I managed to sort it this morning. I simply used the terminal "mv" command to move it to another folder, I used Documents then I moved it back and hey presto! Thanks very much for the help though.This assumes you are developing as a non privileged user.
If the files reside in a web folder (e.g. /var/www), then the owner is likely to be www-data.
You could add your username to the www-data group, and then ensure that all files have 664 and folders 775 permissions.
To add yourself to the group (off the top of my head) gpasswd -a <username> <groupname>
NOTE - if this is a production server - DO NOT DO THIS!!
If it's just your own dev box then it's fine.
It could also be apparmor causing this.
Are you running apparmor?
Again, if this is NOT a production machine - you can simply disable and remove apparmor.
AppArmor can be disabled or removed as follows:
Disable AppArmor using the following commands:
# /etc/init.d/apparmor stop
# /etc/init.d/apparmor teardown
# update-rc.d -f apparmor remove
Then, restart the server.
Remove the apparmor package with your package manager:
apt-get remove apparmor
^^^ stupid forum won't let me add a second batch of code tags.
Edited by TonyRPH on Friday 24th March 11:36
Edited by TedLeveTT on Friday 24th March 19:02
TedLeveTT said:
Thanks for the help, but I managed to sort it this morning. I simply used the terminal "mv" command to move it to another folder, I used Documents then I moved it back and hey presto! Thanks very much for the help though.
No worries - I had to read your reply about 5 times to find your response, as you replied inside my quote.Odd that just moving the files around fixed it, unless permissions changed in the process.
TonyRPH said:
No worries - I had to read your reply about 5 times to find your response, as you replied inside my quote.
Odd that just moving the files around fixed it, unless permissions changed in the process.
Woops, don't know how that happend, sorry about that! Yes well i guess by moving the folder into My Documents it changed the permissions? The original file was unzipped from my google drive. Once again, thanks for the help! Odd that just moving the files around fixed it, unless permissions changed in the process.
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff