vTiger Custmer Portal - Invoice Issure: .pdf download error - vtiger

Unfortunately we had a DB-Crash last week. therefore I used an backup copy of the system to rerun it. Everything goes well but the PDFMaker Pro. First I had license issues. PDFMaker did not accept my original license ID. This was fixed after un/reinstall of PDFMaker Pro. But, since then, when I activate PDFMaker Pro Invoice for the Customer Portal via Checkbox in the Invoice Settings of PDFMaker and hitting the subject link in Customer Portal for downloading the invoice, it generates an “index.pdf”. All settings like filename (for example invoice number) are ignored and the index.pdf does even not open. It returns an alert / warning in Adobe Acrobat: “Acrobat could not open pdf”.
The PDFMaker works in the Admin Interface. So everything is fine. But it does not work for the Customer Portal Invoice Module.
In Soap/customerportal.php I’ve found this lines of code:
$fieldid = $adb->query_result($res,0,'invoiceid');
//$fieldlabel = "(Download PDF) ".$fieldlabel;
$fieldvalue = ''.$fieldvalue.'';
I don’t know if something is wrong with the code, or what else to check, finding the mistake. I’m looking for your advice fixing this bug. The PDFMaker Support is very slow and did not answer after 2 days. So, please if you have any idea, share it!
Thank you!
Jasper

Well fixed it myself:
reinstall the soap/customerprotal.php if from PDFMaker necessary and check the premission rights of directories:
chmod 777 config.inc.php
chmod 777 tabdata.php
chmod 777 install.php
chmod 777 parent_tabdata.php
chmod 777 cache/
chmod 777 cache/images/
chmod 777 cache/import/
chmod 777 storage/
chmod 777 install/
chmod 777 user_privileges/
chmod 777 Smarty/cache/
chmod 777 Smarty/templates_c/
chmod 777 modules/Emails/templates/
chmod 777 modules/
chmod 777 cron/modules/
chmod 777 test/vtlib/
chmod 777 backup/
chmod 777 Smarty/templates/modules/
chmod 777 test/wordtemplatedownload/
chmod 777 test/product/
chmod 777 test/user/
chmod 777 test/contact
chmod 777 test/logo
chmod 777 logs/
chmod 777 modules/Webmails/tmp/
and index.pdf means the customer has not premission rights.
Hope this can help in the future.
Jasper

Related

How to change permission of django project?

I have created my project in centOS 7 using root.Each time when saving the project after changes its asking the password.How do I change the permissions of the whole project now ?
To make everything writable by anyone run this in directory with your django project:
chmod -R 0777 ./
Are you sure you want to keep it owned by root? I'd suggest to change the owner to whatever services should use the project.
chown -R <some-user> /path/to/project # user may be www-data
chmod -R 755 /path/to/project

Permission denied to upload folder Django

I am trying to upload images in django. I have set static directory in settings.py
MEDIA_ROOT = os.path.join(BASE_DIR, '/assets/image/')
MEDIA_URL='http://127.0.0.1:8000/assets/image/'
here is my model image Field
doImage=models.ImageField(upload_to='doImage/%Y/%m/%d',verbose_name='Do Image')
Now when i tried to upload it then i faced permission denied 13 error.
I had tried command chmod with 777 to give a permissions to folder
sudo chmod -R 777 assets
i also had tried change user of file using command
sudo chown -R hassan:hassan assets
But both things didn't worked for me. So anyone have idea that what's going wrong let me know.
Django stores files locally using MEDIA_ROOT and MEDIA_URL. Please refer this doc for more details.
For example you can also check this.
Don't do:
sudo chown -R root:root assets
This way only root user has rights over assets
Do:
sudo chown -R your_user:your_user /path/to/your/assets

Django [Errno 13] Permission denied: '/var/www/media/'

I can not add a comment to this post - https://stackoverflow.com/a/21797786/6143954.
So I created a new question.
It was the correct answer before it was edited. In this answer, the line
sudo chmod -R 770 /var/www/
is replaced by
sudo chmod -R 760 /var/www/
Specifically, this solution is not suitable for Django.
The answer should not be changed after it has been marked as the right solution.
That was the correct answer before correcting the original post.
The GOOD solution would be:
sudo groupadd varwwwusers
sudo adduser www-data varwwwusers
sudo chgrp -R varwwwusers /var/www/
sudo chmod -R 770 /var/www/
How correct is this solution?
sudo chmod -R 770 /var/www/ is fine.
This means that owner and group has all rights and others don't have any rights.
This is right way.
If you set 760, group users will get Permission denied on read or write attempts.
For files inside directory you can set them as 760.

PHP Fatal Error on 'php artisan migrate' on remote AWS EB instance: laravel.log: Permission denied

When I SSH into my AWS EB instance to run php artisan migrate, I get the following error message:
Link to bigger size of picture below
I am completely confused. First, I don't get this error on the local server. Second, what does a simple log file have to do with migrations anyway? They are ignored by git by default, so no log files are uploaded.
Sigh... Any ideas on how I can be allowed to run my php artisan migrate?
It's always the storage folder. Blank pages or permission denied, it's the darn storage folder.
I don't know how EB works, if it's a regular distro or what, but you should change ownership of the storage folder to the web server (www-data most likely) so it can build the views then set 775 permission so you can write/read logs.
So something like:
sudo chown -R www-data:www-data storage/
sudo chmod -R 775 storage/
I've gone through the same error
As stated here,
AWS AMI uses webapp as the web user, not apache or ec2-user as the
file shows. In that case, the webapp user has no access rights over
those files.
So, going through the steps mentioned in there fixed the problem
sudo chown $USER:webapp ./storage -R
find ./storage -type d -exec chmod 775 {} \;
find ./storage -type f -exec chmod 664 {} \;
Depending on what you're aiming to do afterwards you might need to go through this too.

Amazon AWS Filezilla transfer permission denied

I have my instance of the Amazon AWS running, test page is up.
I am trying to SFTP the files to the server to display my website. I have Filezilla connected to the AWS server but when I try to move the files from my local machine to the /var/www/html directory, it says permission denied.
I just figured out I CAN move the files to the /home/ec2-user directory. So my files are on the server I guess. But when I try to move them from there to the /var/www/html directory, it still won't move them, permission denied.
I've been researching this for approximately 2 hours now but I haven't been able to locate the answer to this.
Any help is greatly appreciated, i'm so close! Haha
Thanks
UPDATE
To allow user ec2-user (Amazon AWS) write access to the public web directory (/var/www/html),
enter this command via Putty or Terminal, as the root user sudo:
sudo chown -R ec2-user /var/www/html
Make sure permissions on that entire folder were correct:
sudo chmod -R 755 /var/www/html
Doc's:
Setting up amazon ec2-instances
Connect to Amazon EC2 file directory using Filezilla and SFTP (Video)
Understanding and Using File Permissions
if you are using centOs then use
sudo chown -R centos:centos /var/www/html
sudo chmod -R 755 /var/www/html
For Ubuntu
sudo chown -R ubuntu:ubuntu /var/www/html
sudo chmod -R 755 /var/www/html
For Amazon ami
sudo chown -R ec2-user:ec2-user /var/www/html
sudo chmod -R 755 /var/www/html
In my case the /var/www/html in not a directory but a symbolic link to the /var/app/current, so you should change the real directoy ie /var/app/current:
sudo chown -R ec2-user /var/app/current
sudo chmod -R 755 /var/app/current
I hope this save some of your times :)
If you're using Ubuntu then use the following:
sudo chown -R ubuntu /var/www/html
sudo chmod -R 755 /var/www/html
This work best everyone
chmod ugo+rwx your-folder
https://help.ubuntu.com/community/FilePermissions
In my case, after 30 minutes changing permissions, got into account that the XLSX file I was trying to transfer was still open in Excel.
for me below worked:
chown -R ftpusername /var/app/current