Cannot lock pid file /var/run/freeswitch/freeswitch.pid,this is the error when I start my freeswitch on CentOs7 - freeswitch

how can I solve this problem?
Cannot lock pid file /var/run/freeswitch/freeswitch.pid
Sorry for my poor English

There are few reason for this.check one by one.
check weather /var/run/freeswitch/ directory exist. if not then create it and give appropriate permission using chmod command.
check weather freeswitch user have permission to /var/run/freeswitch/ directory.if not then create it and give appropriate permission using chmod command.
check weather there is already any freeswitch.pid exist.if so then delete it.

Related

Unable to modify permissions of folders on Mac (Mojave)

I am new to Macs and I am trying to run some interesting stats on my iMessages using the code runner extension on VSCode. I've been following this post: https://towardsdatascience.com/heres-how-you-can-access-your-entire-imessage-history-on-your-mac-f8878276c6e9
However, when I run the line conn = sqlite3.connect('/Users/<username>/Library/Messages/chat.db')
I get the error sqlite3.OperationalError: unable to open database file
Based off what I can tell my issue is that VScode doesn't have the right permissions to access the ~/Library/Messages folder and possibly the chat.db as well. First, I ran ls -l on Library and the result is drwx---rwx for Messages. So I tried to use both chmod a+rwx Messages and sudo chmod a+rwx Messages to open permissions to everything but got the error chmod: Unable to change file mode on Messages: Operation not permitted both times.
Am I doing something wrong and/or is there a better way to do this? Or is it just not possible to change the permissions of this folder?
After some more creative searching I discovered that it was an Issue with Mojave's System Integrity Protection (SIP) and can be solved by giving the desired apps full disk access in Settings>Security&Privacy>Privacy>FullDiskAccess.
Solution found here

Fix file permissions on a Mac

I'm having a weird behaviour on my mac. I got some files from another computer, and for some reason the system can't identify the user related to some permissions. Here is a pic of what I get on the finder permission manager —is in Spanish, but I'm pretty sure that in English would be very similar—
Basically, what it says, is:
obtaining… writing and reading
admin writing and reading
munchausen (Me) writing and reading
wheel writing and reading
everyone writing and reading
So is like it can't find the name of a user, which makes sense, because this files had permissions for an user that doesn't exist in this computer.
How can I clean this permissions? From the folder, I tried with:
sudo chmod -R 754 .
It gave proper permissions, but didn't solved the problem of the obtaining… thing.
Any idea?

EC2 AMI instance is resetting folder permission everyday

I have a log folder /var/www/app/logs/ in an EC2 AMI instance. My PHP aplication is writing logs there, however every day I must logon and do chmod in order to avoid the error message that the folder is not writable:
$ sudo chmod 7777 -R /var/www/app/logs/
For some reason the instance this permissions are reset every morning automatically by some unknown process. Is there a way to make this change permanently?
My guess is that you have some log rotation rules set up for this directory, which might be responsible for the permission change.
And, don't set the permissions to 777, definitely. Either change the owner of the directory to your application user, or add your application user to a group which has write permission to the directory.
Not sure whether is the best solution, but solves my problem. Edit the /etc/httpd/conf/httpd.conf file and change:
User apache
By:
User ec2-user
Then restart the webserver.

Permission denied when starting .bashrc on ubuntu on windows

I wanted to add a path to my .bashrc file on Ubuntu on Windows.
Since then, I get always:
/home/gian1312/.bashrc: Permission denied
I deleted all my changes. It did not help.
Then I opened the .profile file to add the path there. --> Now I get:
/home/gian1312/.profile permission denied
I deleted all my changes. All edits were made by Notepad++ in Windows.
I am looking for a solution for several days. Probably a reinstallation would help but as long as I do not know the reason I do not want to risk to face the same problem.
Best Regards and thanks a lot
Gian
The error simply says that permission denied. Since the question is not completely clear, the following things can be tried:
1) Check the permission of the file ".bashrc" and ".profile" and make sure it is 0644
2) Check the upper level directory permission (here the folder /home/gian1312) and make sure it is 0755.
3) If the first two are fine, then you need to check the permission of the "path" which you are trying to add and it should have enough permissions to be readable by the user "gian1312"
Editing the answer as per the below comment:
To change the permissions, please run the below commands:
chmod 0755 /home/gian1312
chmod 0644 /home/gian1312/.bashrc
chmod 0644 /home/gian1312/.profile

Apache Drill: Local udf directory must be writable for application user error

I'm trying to get Drill up and running on my machine. However, whenever I enter drill-embedded mode (bin/drill-embedded on Bash), I get this error:
Error: Failure in starting embedded Drillbit: java.lang.IllegalStateException: Local udf directory [/tmp/drill/udf/udf/local] must be writable for application user (state=,code=0)
If I try to run a query at this point, it'll give back:
No current connection
Any idea how to fix this? I've tried starting with a clean shell with no luck. Is it a permissions issue?
You have to give the directory /tmp/drill/udf/udf/local write access. Since it is a directory in /tmp, you might need root access to give permissions, or you will have to use sudo. To give permission, use this:
chmod 777 -R /tmp/drill/udf/udf/local
Also make sure the user is having at least read permission on the parent directories, otherwise you will get a permission denied error again.

Resources