PDF getting created with permission 600? - permissions

I'm experimenting a weird issue. Most of the time (almost everytime) my pdf are getting generated with the permission (rwx-r--r--) 644 which is correct.
But 'sometimes'.. and I cannot understand why this happens but they get created with permission (rw-------) 600. this cause a "permission denied" when other systems try to copy or read the PDF...
Did someone already had this issue? Is it possible that is it a problem in my Jasper config ? or the Server config ?
Ps: I'm running my web app on an redhat server (container is Weblogic ).

This happens when the program through which you run and generate PDF is in the same permission that is root.
you can run your PDF generating software ( or whatever you are using ) in home user mode and not root user mode)
Or just go to that folder where your PDF has been generated and run from terminal
user#your_folder>> sudo chown username:username *
give password if asked.... You can use this with every file and folder that has this problem
You will see once you run this command a 'LOCK' icon goes away and file/folder becomes normal
Hope this helps you

Related

Drupal 8 File Upload error: Could not move uploaded File

I have created a new content type, and all of a sudden I can not upload any images to my site. It is a local server so disk space is not an issue.
The error is
The file could not be saved because the upload did not complete.
File upload error. Could not move uploaded file.
This value should not be null."
It is drupal 8.1.8
I have changed the temp directory to a place that www-data has full read and write permissions, as well as changing the files folder to 777, none of which seem to fix the issue.
There isn't even any apache errors that are being thrown, the only error is in drupal logs and on the page
error screen
on drupal root directory try
sudo chcon -R -t httpd_sys_rw_content_t sites/default/files
See the folder premissions here: https://drupal.stackexchange.com/questions/373/what-are-the-recommended-directory-permissions. This is a common folder permissions issue.
I fixed the problem on (Laragon, Drupal 9 & Windows 10) by changing the PHP from NTS to Thread Safe.

Vagrant for web server with shared folders: Apache breaks file permissions if it tries to stat a file before it exists

I'm not sure if this is an issue with vagrant, virtualbox or a configuration issue inside the box itsef, however:
Using the following setup: Apache is running in the guest with its server root set to /srv/http, this is a synched folder which points to ./public_html on the host.
While most of the time it works as expected, the following steps causes an issue
1) Navigate to a file that doesn't exist localhost:8080/test2.css -- shows a 404 error as expected but correctly connects to the guest which is serving the error
2) Create test2.css with some content and place it in public_html
3) Reload localhost:8080/test2.css -- Still shows a 404 error even though the file now exists
4) To debug, run vagrant ssh and then ls /srv/http. Which shows:
ls: cannot access test2.css: No such file or directory
So it's seeing the file, sort of but it shows without any permissions:
-????????? ? ? ? ? test2.css
-rw-rw-r-- 1 vagrant 7 Oct 23 11:13 test3.css
If I then re-save the file as test3.css, a file that hasn't yet been accessed it works perfectly. E.g. on the host, save the file I had open as test3.css and then navigate to it, it works as expected!
Any ideas? On why this might be?
In short: If apache has tried to read a file that doesn't exist, creating that file will then cause it to have invalid permissions. If apache has never tried to read the file before, it can be created and work as expected.
Thanks for any help, I'm really confused by this!
This turned out to be a kernel bug on the guest. Upgrading to 4.2.4 using the same Vagrant/Virtualbox/Guest Modules solved the issue.

Could not update .ICEauthority file

Recently I changed the permissions of the file system and gave myself all the rights. I logged out of the system and I couldn't log back in. I got the error message
Could not update ICEauthority file /home/marundu/.ICEauthority</>
I did a live boot with a Fed 17 disc and replaced my .ICEauthority file with the live-user version and it worked for a time, until I logged out again. Now, the login progress screen is all that shows. I can log into command mode (Ctrl-Alt-F2) but I can't sudo - I get the error messages:
sudo:/usr/libexec/sudoers.so must be only writable by owner and sudo: fatal error. Unable to load plugins.
I just found a good link on Ubuntu:
Ask Ubuntu: ICEauthority permissions problem
Some things to note:
I tried the obvious things like changing file permissions, but found my whole home directory was somehow owned by root. I believe this was due to a failed package update.
I used a recovery disk (Knoppix ISO) for ease of use: Better UI
When mounting the bad home partition, I used the most common Linux file type (Ext4)
I used 'sudo mount -o r,w -t ext4 /dev/sda1 /mnt'
When changing ownership, I used the numeric user:group specification, since the recovery disk doesn't have the symbolic users and groups: 'sudo chown -R 1000:1000 /mnt/home/userdir'
I verified that /home/userdir had rwx for owner, r-x for group / other. This is noted as a valid set of permissions for ICEauthority; others can work. See the linked discussion.
Hope that helps someone...
I got the “Could not update ICEauthority file” error and found that my home partition was in "Read-Only" mode. Thus, this error made sense.
The real question was what caused the "Read-Only" attribute on the partition. I ran "dmesg | read-only" and found that there were serious errors with the file system on my home partition which the kernel had set to "read-only during the boot process.
I then booted from a USB key (CDROM would do as well) and ran "sudo fsck /dev/sdXY" where /dev/sdXY is the partition containing my home directory. fsck corrected a number of file system errors on my home partition.
I then reboot after removing the USB key/CDROM and the problem went away.
Bottom line: Check if your home partition has file system errors. They might be the cause of this error. If so, run fsck from an external device on the partition containing your home directory.

Cannot set-up MyPHPadmin in Apache

I just started using Apache, but when I try to run myPHPadmin, I get this error message:
1 - Can't create/write to file '/var/folders/w1/5yx2p9mj7w9bm67gdwhqxwsr0000gn/T/#sql1ba_3_0.MYI' (Errcode: 13)
Another post in the Stack Overflow suggested changing the permissions on the XAMPP file, my.cnf, with this command:
sudo chmod 600 my.cnf
I tried running the code in Mac Terminal, but the result was "No such file or directory."
Does anyone know what I should try next?
This is a permission problem on your datadir (where MySQL wants to write files). Normally, at MySQL installation, correct permissions are set for the user who runs mysqld.
Are you sure that MySQL was installed correctly as part of XAMPP installation?

reputation module installation in phpbb3

Hi i am trying to install phpbb-reputation system i followed the xml file for installation but while executing install_reputation.php i am getting this error ERROR: Could not open the file ./styles/afterburnerafterburner_config.html for reading.There are many errors in the same fashin. where i gues it is not going inside afterburner/template folder where .html file exists. where should i check this?
More error samples:
Refreshing the proFormell template
ERROR: Could not open the file ./styles/proFormellcaptcha_recaptcha.html for reading.
Sounds like it's a permissions issue; if hosting on a LAMP server, just run chmod 755 * -R in the website root directory. Alternatively you could also change file permissions using an FTP client