I have a binary file named node_exporter, which has executable file permissions:
-rwxr-xr-x. 1 root root 16834973 Jul 29 08:35 node_exporter
I use the Artifactory CLI to upload the file:
./jfrog rt u node_exporter {repo}/node_exporter.
And then to download the file:
./jfrog rt dl {repo}/node_exporter.
Once downloaded, the file loses executable permissions.
-rw-r--r--. 1 root root 16834973 Jul 29 08:44 node_exporter
I know that using cURL doesn't deal with metadata, but I'm not sure why the official CLI doesn't as well. Is it possible at all to upload/download while preserving file permissions? This is being used in integration with Jenkins, so I would rather not have to set the file permissions after downloading the binary for each build.
Related
I'm new on GCP and on linux and I try to mount a bucket on my centos instance using gcsfuse.
I tried with a script running at boot but it was not working so I tried with fstab (peoples told me it is much better)
But I got this error when I tried to ls my mounted point :
ls: reading directory .: Input/output error
here is my fstab file :
#
# /etc/fstab
# Created by anaconda on Tue Mar 26 23:07:36 2019
#
# Accessible filesystems, by reference, are maintained under'/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=de2d3dce-cce3-47a8-a0fa-5bfe54e611ab / xfs defaults 0 0
mybucket /mount/to/point gcsfuse rw,allow_other,uid=1001,gid=1001
According : https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/mounting.md
Thanks for your time.
Okay so I just had to wait 2 minutes due to google auth granting my key. Basically it works
Could anyone help me to understand next behavior?
on server (Centos VM) installed font google-crosextra-
carlito-fonts.noarch (only this one contains necessary calibri font for my customer):
yum search calibri
google-crosextra-carlito-fonts.noarch : Sans-serif font metric-compatible with Calibri font
yum install google-crosextra-carlito-fonts.noarch
ls -l /usr/share/fonts/google-crosextra-carlito
-rw-r--r-- 1 root root 816716 Sep 20 2013 Carlito-BoldItalic.ttf
-rw-r--r-- 1 root root 690516 Sep 20 2013 Carlito-Bold.ttf
-rw-r--r-- 1 root root 623416 Sep 20 2013 Carlito-Italic.ttf
-rw-r--r-- 1 root root 635996 Sep 20 2013 Carlito-Regular.ttf
"registered" new font in the system with command (but also reboot server):
fc-cache -f -v
created simple report on Jasper Studio with some text fields (Blank_A4.jrxml)
added font Carlito-Regular.ttf (from Centos server) to Studio (see screen)
exported Carlito-Regular.jar file from Carlito-Regular.ttf copied to WEB-INF/lib folder; restarted application server + removed all caches from /temp & /work
added to report font extension, saved it and published to Jasper server (JRS)
As result - on JRS it seems flickering problem with fonts during report execution. Please see screencast:
https://www.screencast.com/t/O3EH5FAE5n1L
Tried to apply a few different font to the report (Blank_A4_2 & Blank_A4_3 on video) as well as calibri.ttf downloaded from internet - the same result (on Chrome, Firefox, IE).
It looks like report is trying at first to load the some default font form OS and then the applied font of font family.
Here's my issue:
START RequestId: 3ef6bbb9-62da-11e8-82ba-81e0afb0b224 Version: $LATEST
Unable to import module 'lambda_insertEmailAddress': No module named psycopg2
END RequestId: 3ef6bbb9-62da-11e8-82ba-81e0afb0b224
REPORT RequestId: 3ef6bbb9-62da-11e8-82ba-81e0afb0b224 Duration: 0.44 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 19 MB
My zip file has the following structure file name: lambdaInsertEmail.zip:
total 98784
drwxrwxrwx 20 chauncey staff 680B May 27 13:22 psycopg2
drwxrwxrwx 22 chauncey staff 748B May 27 12:55 postgresql-9.4.3
-rwxrwxrwx 1 chauncey staff 1.8K Apr 30 15:41 lambda_insertEmailAddress.py
-rw-r--r-- 1 chauncey staff 48M May 30 12:09 lambdaInsertEmail.zip
In case you want to know my setup.cfg file has the following changes:
pg_config=/Users/chauncey/Desktop/portfolio/aws_lambda_files/lambda_insertEmailAddress/postgresql-9.4.3/src/bin/pg_config/pg_config
static_libpq=1
I'm trying to get this lambda function working.
The problem is being cause because psycopg2 needs to be build an compiled with statically linked libraries for Linux. Please reference Using psycopg2 with Lambda to Update Redshift (Python) for more details on this issue. Another reference of problems of compiling psycopg2 on OSX.
One Solution is to compile the library using an Amazon Linux AMI. Once you have connected to the AMI with SSH:
Set up aws credentials using aws configure
sudo su -
pip install psycopg2 -t /path/to/project-dir
Zip directory zip project-dir.zip project-dir
Upload to Lambda using CLI
Hopefully this helps you understand the issue and a possible solution solution. There are additional solutions in the above references, such as using boto3 or this repo https://github.com/jkehler/awslambda-psycopg2, but this is the solution that worked for me.
pip install psycopg2-binary
fixed it for me
I just moved to a new server with Plesk pre-installed on it, my sites work now but when I try to send mails I get the following error:
Mar 5 13:43:14 www postfix/qmgr[2271]: 9351512650BA:
from=, size=572, nrcpt=1 (queue active) Mar 5
13:43:14 www postfix-local[3080]: postfix-local:
from=info#[MY_DOMAIN].nl, to=servers#[MY_DOMAIN].nl,
dirname=/var/qmail/mailnames Mar 5 13:43:14 www
postfix/pipe[3079]: 9351512650BA: to=,
relay=plesk_virtual, delay=1307, delays=1307/0.04/0/0.05, dsn=4.3.0,
status=deferred (temporary failure. Command output: /bin/sh:
/usr/lib/dovecot/dovecot-lda: No such file or directory 4.2.1
Message can not be delivered at this time )
I have been looking for over an hour but I have not found a fix yet.
The directory /usr/lib/dovecot does not exists, the directory /usr/lib64/dovecot does exists.
The server runs on Centos.
SOLVED: I found out that I copied the full mail directories, including the config files. I removed the mailboxes and moved over the mail directories without config files. Now the mailbox works again.
So for everybody with the same problem when moving. Don't copy your mail config files.
Various options exist:
ln -s /usr/lib64/dovecot/dovecot-lda /usr/lib/dovecot/dovecot-lda,
Edit your postfix/master.cf file and change the /usr/lib/dovecot path to /usr/lib64/dovecot,
Install a 32-bit version of Dovecot on that box.
All have their disadvantages, the best thing is to coordinate with the people who wrote the software that manages the email config and let them know your trouble.
I posted this as an answer on the original question posed on
postgreSQL permission denied when reading from file with \i command
But I now realise I should have posted as a separate question.
My OS is Fedora 21, I have installed PostgreSQL-9.4
I am trying to read a file using the \i command and error message is Permission denied. I have chmod a+r on the file.
On my system there are 3 users [root, damo, postgres] and I have established a group [project] that has 2 members [damo, postgres]. I have used chgrp on all relevant directories which (I believe) should grant permission to user [postgres] to access various files.
I access pqsql with the user [postgres] but all of my other work is under user [damo]. Within pgsql using the tab to navigate from the command \i stops after
../../home/damo
and I can go no further. This obviously important but I don't know what it means. So I moved the file to that location and it still does not load. This is the output from ls -l and stat
$ ls -l testScript.sql
-rw-r--r--. 1 damo project 76 Nov 5 18:18 testScript.sql
$ stat testScript.sql
File: ‘testScript.sql’
Size: 76 Blocks: 8 IO Block: 4096 regular file
Device: fd02h/64770d Inode: 2623547 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ damo) Gid: ( 1001/ project)
Context: unconfined_u:object_r:user_home_t:s0
Access: 2015-11-05 18:18:06.082928881 +0000
Modify: 2015-11-05 18:18:06.084928866 +0000
Change: 2015-11-05 18:25:57.041183384 +0000
Birth: -
Can anyone advance some suggestions?
You're on Fedora 21, so you likely have SELinux enabled by default. The postgres user probably doesn't have the rights to access the security context user_home_t. The security context is shown by your stat output. You can include it in ls using ls -lZ.
The selinux boolean postgresql_selinux_unconfined_dbadm looks like what you want for that, per getsebool -a.
Check
getsebool postgresql_selinux_unconfined_dbadm
and if it's off, try:
setsebool postgresql_selinux_unconfined_dbadm on
Also, to determine whether selinux is what's denying access, check the system logs or run the sealert tool (SELinux alert browser).
Apart from that, it could well be that one of the directories in the absolute path of the file denies access to your operating system user.