failed to start jboss service with non root user - linux

I tried to start jobs service with non root user and group but I received runuser cannot set groups operation not permitted jobs error in /var/log/jboss-as/console.log. I installed and configured jboss service with non root user. It worked fine with root, but failed to start/stop/restart jboss service with non root user. I have no ideas why this happened.

give permissions to the folder like
chmod 775 -R

Related

Error in Linux RHEL09 when switching to user after auto-fs service enabled

Trying to set up nfs-share and auto-mount using autofs on RHEL 09
I am trying to auto-mount a user account on 172.16.10.10 from an exported directory /rhel/user1 on 172.16.10.20
the directory for the home user on 172.16.10.10 is /users/user1
I can set this up properly and create a user (user1) so that their home directory is /users/user1. I can check by su - user1 and pwd shows /users/user1
However, after configuring the autofs service in the two files
/etc/auto.master.d/user1.autofs >>>>>> /users /etc/auto.user1
/etc/auto.user1 >>> user1 -rw 172.16.10.20:/rhel/user1
then restart the service using >>> systemctl restart autofs
Then when I switch to that user >> su - user1
I get an error >>>> su: warning: cannot change directory to /users/user1: No such file or directory
This has worked in the past, but also this service will often give this error. A bunch of people in my class have got this error, and now I'm getting this. Please help!
I've tried checking and changing the directory permissions to the /users directory, but this has not worked. I've reverted back to snap-shots again and again, but this has not helped

Ubuntu / NGINX - Can't change ownership or permissions of certain directories and files

I have some folders on a ubuntu server running Nginx with the following permissions & groups:
drwxr-xr-x 3 www-data www-data some_folder
I am trying to delete these within a deployment script, as a user called deploy. This user is in the www-data group.
I know that to delete these folders, I need group write permissions (which I currently don't), however the deploy user doesn't have the permissions to set this. I've tried chmod 775 some_folder and also setting the deploy user as the owner with chown deploy some_folder, but I always get this error:
chown: changing ownership/permissions of 'some_folder/': Operation not permitted
How can I delete these folders without using sudo?
Thanks in advance for any help

When Jenkins deploy: chmod: changing permissions of '*' operation not permitted

I want to setup jenkins to deploy PHP code.
Let's say we have three users in system: www-data (Apache), tomcat (jenkins) and user (me).
I have added jenkins and user to www-data group.
Existing code (that already running on server and should be overwritten by tomcat) own by user and belongs to www-data group and has 775 permission.
But when I run jenkins and doing chmod -R 775 * I get:
chmod: changing permissions of ‘LICENSE.md’: Operation not permitted
But permissions already 775 and again tomcat in www-data group.
Any thought what I am doing wrong?

CentOS 7 Symfony 2 Unable to create the cache directory Issue [duplicate]

I've downloaded 2.0.4... I can't get pass the "can't create cache directory" cause of permissions problem...
I've tried chmod 777 -R symfony
-- to all folders, still can't create cache dir
I've tried setfacl but it says unrecognized -m option....
My system does not support chmod +a
I've done chown -R myuser:apache symfony
-- still nothing
I've tried umask(0000) and umask(0002) in console.php/app_dev.php/app.php
-- still nothing
When I refresh the page to http://localhost/symfony/web/app_dev.php, I get a SElinux alert... is this causing something? I'm not sure... all symfony content is word writable.
I'm not sure if it's me... but it's driving me nuts, maybe I just should stop using symfony2.
I'm using Fedora 13.
It seems that you will need to switch SELinux to Permissive state. You can do so executing as root user:
setenforce 0
PHP's umask may have no effect when default apache umask is different.
Originally I used to use setfact, but this adds overhead for deployment.
What worked for me on ubuntu servers is:
Set default apache umask.
Edit /etc/apache2/envvars and add this line in the end of file:
umask 0002
Reload apache service
Add your deploy user to www-data group, add www-data to your deploy user group.
adduser www-data `whoami`
adduser `whoami` www-data
Logout or restart server for this to take effect.
Remove app/cache, app/logs dirs
Try to load page in browser, notice how app/cache dir is created by www-data user and has write group permission. Try to clear cache in console and verify that no errors occurred.
Remove app/cache, app/logs dirs
Run cache:clear, notice how app/cache dir is created by user deploy user and has write group permission. Try to load page in browser, and verify that no errors occurred.
Now you can forget about cache and logs permissions on this particular server for all subsequent projects.

Linux permissions issue

I'm trying to use Jenkins to deploy to a custom workspace but am having permissions issues. The custom workspace folder is /var/www/workspace which is owned by www-data and in the www-data group as normal. I have added my jenkins user to the www-data group and the folder has writable permissions on user and group level. When I run the Jenkins build it fails because it doesn't have permission to clone into the folder. The only thing I can think of that may be stopping this from happening is the fact that the var folder is owned by root even though www and all folder below this are owned by www-data
Any advice appreciated.
Do one thing, go to /var/www/ and type the following command and paste output:
ll
Responding to your comment, to change the owner and group of /var/www/workspace and all files under it you can use:
chown -R jenkins:www-data /var/www/workspace
In the end I changed the user that Jenkins is running as from Jenkins to www-data. Probably not the ideal way to do things but as this is on a non public facing server it suits my purpose. Now when a build has completed I get Jenkins to run a couple of chmod commands to make sure file permissions are correct and the files are already in the www-data group so all works nicely.

Resources