Error: pbs_iff: cannot read reply from pbs_server - pbs

I have installed Torque-4.2.6 version. My machine has RHEL 6 Operating System. I have installed through user1 login as it has root permission. It is working properly whenever I execute 'pbsnodes -a' command. If I'm login through user2 onto the same machine, whenever I execute 'pbsnodes -a' then it is throwing the following error.
pbs_iff: cannot read reply from pbs_server
No Permission.
pbsnodes: cannot connect to server 'node1', error=15007 (Unauthorized Request )
There no such executable as pbs_iff. What could be the problem.? Can anyone help me.?

Here is my experience with PbsPro, I would assume it works similar with Torque.
What you need is to change the pbs_iff mod to -rwsr-xr-x by:
chmod 4755 /opt/pbs/.../sbin/pbs_iff
Refer to the location of pbs_iff file in your system. Note it is in the pbs.../sbin folder instead of the bin folder.

Per https://serverfault.com/questions/253932/torque-works-half-of-the-time-fails-no-permission-the-other-half -- there may be an issue with the queue being clogged with corrupt jobs, possibly from a dead node, so manually clearing out
/var/spool/torque/server_priv/jobs/
and
/var/spool/torque/server_priv/arrays/
and restarting pbs_server may solve the issue.
Note you will obviously have to resubmit these jobs back to the queue

qmgr
Qmgr:set set server acl_host_enable=False

Related

NiFi 1.10.0 - PutFile does not see the destination directory

We are facing a peculiar problem on one of our 2 environments. A PutFile processor throws the following error
PutFile[id=xxx] Penalizing StandardFlowFileRecord[uuid=xxx,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=xxx, container=default, section=1012], offset=94495, length=9778],offset=0,name=xxxxxxxxxxxxxxxx_PROD_20200513020001.json.gz,size=9778] and routing to 'failure' because the output directory /data/home/datadelivery/OUT/Test does not exist and Processor is configured not to create missing directories
After enabling the creation of missing directories, the error changes to:
Could not set create directory with permissions 664 because /data/home/datadelivery/OUT/Test: java.nio.file.AccessDeniedException: /data/home/datadelivery/OUT/TestPutFile[id=xxx...
Based on the error message one would think that it is an issue with file and folder permissions, however, the path /data/home/datadelivery/OUT/Test exists, and the nifi user can access and create files and folders in there as well (verified from the command line). The same folder permissions and ownership rights are configured on our DEV environment, where the PutFile processor works as expected. We could change the configuration to use a different location, but I'd rather find the root cause instead.
Where should I start debugging?
Thank you for your help in advance!
Kind regards, Julius
Strange issue, I would try to set full permission on the folder/file you want to write (ie chmod 777 + chown nifi:nifi + recursively), and see if the error is still there. If not it's kind of a start ...
Restarting the NiFi service solved the problem. The issue was that the Unix user (nifi) was modified months after starting the NiFi service. Most probably this was the reason the PutFile processor wasn't able to access a folder which the nifi unix user could.

The stream or file .../logs/laravel.log could not be opened: failed to open stream: Permission denied. Different users need to write logs

I'm using Apache 2.4 on Ubuntu 16.04 and everyday I have the same problem on my Laravel 5.5 application:
"The stream or file "myapp/storage/logs/laravel-date.log" could not be opened: failed to open stream: Permission denied"
And I see a lot of people have had the same issue, and the fix is usually changing permissions and ownership.
My problem is that actually two different users need access to create and write logs: ubuntu (I'm using AWS) and www-data (Apache user).
So if I change ownership to www-data whenever I try to run an artisan command I get the error, and if I change it to ubuntu I get the same issue whenever apache wants to log an error or something.
I have tried to make ubuntu part of the www-data group but that doesn't seem to fix the issue, since whenever a new log file is created with the following permissions
-rw-rw-r-
Which I think it's what gives me the issue.
So, any help? Thanks in advance

NT_STATUS_ACCESS_DENIED Error in Samba share

So, I tried to set up a public SMB share with Samba on CentOS 7. Now, I have it set up, and I have a headache. But, sweet victory. I'm posting this here for all y'all so that you don't need to waste your time. It's actually easy, you just need to know the hoops you need to jump through. I'll also edit the Samba wiki.
The first problem was that it wouldn't connect at all, except locally:
Remote Connection (my Linux desktop):
-------
[root#my-desktop ~]# smbclient //sambaserver/PublicDocs -N
Error connecting to 192.168.100.97 (No route to host)
Connection to cgybkp01 failed (Error NT_STATUS_HOST_UNREACHABLE)
On Windows 8, using Windows Explorer, after typing "\\sambaserver" into the address bar, the progress bar would wait, wait, wait, then time out. The error message was:
Remote Connection (my Windows 8 desktop):
Windows cannot access \\sambaserver
Check the spelling of the name. Otherwise, there might be a problem with your network. To
try to identify and resolve network problems, click Diagnose.
This ended up being a problem with firewalld. To unblock Samba, I needed to add this line to /etc/firewalld/zones/public.xml :
<service name="samba"/>
Perfect, now I can connect!
But, I was actually mounting an NFS share, so I had one more issue, with SELinux. Now, when I attempt to connect with smbclient...
smbclient //sambaserver/PublicDocs -N
I can connect, but when I try to ls, I get the error: "NT_STATUS_ACCESS_DENIED" in CentOS 7. So, how do I connect?
The first thing everyone recommended that I try was file permissions. If you're not familiar with file permissions in Linux, I'd recommend trying those first. But for me, that didn't work, because SELinux was blocking me.
To see all of the SELinux options for Samba, type:
getsebool -a | grep samba
getsebool -a | grep smb
The one I needed to change was samba_share_nfs, because I was sharing an NFS mounted directory:
setsebool -P samba_share_nfs on
CentOS maintains a list of these booleans here.

session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied [duplicate]

I recently upgraded to PHP 5.3 and since then I get (sporadic) error messages which indicate Apache (or may be the cleaner of the session files) has no permissions to the folder where the sessions are stored.
This happens randomly and can't be reproduced with exact steps, which led me to guess it is the session cleaner.
Any one has any experience with such errors?
The error message (which is fired on the session_start() line) is:
ps_files_cleanup_dir:
opendir(/var/lib/php5) failed:
Permission denied.
ls -ltr on the session directory gives:
drwx-wx-wt 2 root root 4096 2010-05-25 12:39 php5
Inside this directory I do see session files owned by www-data which is my Apache, and the app does work fine.
Which makes me wonder, under which user does the session GC runs?
The fix: In your php.ini set session.gc_probability to 0
The cause
I believe I found the answer here http://somethingemporium.com/2007/06/obscure-error-with-php5-on-debian-ubuntu-session-phpini-garbage
Essentially, the garbage collection is set up to be done by cron jobs on some systems (i.e. Ubuntu/Debian). Some php ini executables like php-cli also try to do garbage collection and that results in the error you got.
This seems to be a typical error on Ubuntu servers (I'm using Lucid LTS). The default permissions of the /var/lib/php5 directory there are
drwx-wx-wt 2 root root 4096 2011-11-04 02:09 php5
so it can be written but not read by the web server, I guess that explains the errors.
As Ubuntu has it's own garbage cleaning via cron (/etc/cron.d/php5), it's probably best to disable php's garbage collection as suggested above by Diwant Vaidya.
session.gc_probability = 0
There's actually a reason the session folder should not be world readable - as the PHP Manual says:
If you leave this set to a world-readable directory, such as /tmp (the
default), other users on the server may be able to hijack sessions by
getting the list of files in that directory.
The solution I currently use (which I am not sure is the correct one) is to give ownership on the session folder to the Apache user (www-data in my case).
This issue has been bugging me for a while. I changed the value as suggested in php.ini and the issue kept occurring. I found the same config value in my index.php and also private/Zend/session.php. So it's worth looking a bit deeper if the issue keeps occurring. I hope this is useful for someone.

Proper permission for sendmail.cf when apache sends mail on linux

I have a web application (bugzilla) in apache that needs to use sendmail.cf . When it tries to use sendmail I get the error:
/etc/mail/sendmail.cf: line 0: cannot open: Permission denied
the web application is in group "apache"
Permissions for sendmail look like:
-rw-r--r-- 1 root root 58624 2008-03-29 05:27 sendmail.cf
What do the permissions for sendmail.cf have to look like in order to be accessed by apache but still be secure enough to lock out everyone else.
I have this issue in a Centos 7 and the answer was here:
http://www.mysysadmintips.com/linux/servers/591-sendmail-won-t-send-emails-on-centos-7-permission-denied
Quick 'sestatus' check revealed that the issue was caused by SELinux.
Running: getsebool httpd_can_sendmail returns off, which means that
Apache (httpd) doesn't have permission to send emails.
The issue was resolved by running: setsebool -P httpd_can_sendmail on
You should have a different .cf file for local submissions, usually called (something like) submit.cf - this will have a slightly different batch of settings specifically for SENDING mail (whereas sendmail.cf will be the part for RECEIVING mail). The submit.cf is safe to be globally readable, because (in theory) all processes on the box should be trusted to send email.
Set the user as root and the group as apache: chown root:apache sendmail.cf

Resources