Privileges to package (app)

  • Thread starter Thread starter Deleted member 78640
  • Start date Start date
D

Deleted member 78640

Guest
I have installed packages emacs, sublime, ...
And these apps can't create/save files.

For example in Sublime I have this error when tried to save:

1708537659093.png


FreeBSD 14.

How can I fix this?
 
I have solved with sublime text:

su -m root -c "sublime_text"

But with emacs, if I launch it in such a way, doom emacs does not launch.
 
What files are you actually trying to edit? Prevent an XY problem from happening and explain what you want to do.
 
I want that emacs has permissions to edit files and have loaded with config of my user.
It does not matter what files. It always throw error "permission-denied Cannot open load file..."

Just after start I have:

1708553801287.png


But when running as su -m root -c "emacs", all works well.
 
Back to basics then because nothing you told so far makes sense. Open a terminal and enter these commands:
Code:
id
pwd
ls -al
Copy/paste the output here.
 
I'll go even one step further backwards than SirDice.

Please start a shell. Cd into a directory (which might be your home directory) which contains a least one file. Say the file is called "foo.txt".

Then issue the command: "emacs foo.txt", go into emacs, modify the file (for example add the word "elephant" to it), and save it with Control-X S (or control S or control C, depending on what you feel like).

Do you get any error messages? Does foo.txt contain elephant afterwards?

If it doesn't "just work", we need to debug things, and SirDice's question aim at the likely culprit: Permissions. Which process is running the shell and therefore emacs? Who owns the file? What are the file's permissions?

In your copious spare time: Explain to me the difference between emacs, sublime emacs, and doom emacs. Show me what executables are used for each. I suspect that in the process of explaining this, the problem will become obvious to you.
 
I can't modify file with it. And I removed it. I will use Sublime Text that works.
Thank you all.
 
I am sure that this was a problem in permissions, but I have no time now to try, I need just code editor. Sublime Text works if I start it from su session.

I will back to this after learning FreeBSD in the future.

Thank you a lot for your help. This thread can be closed.
 
Another question. If I run sublime_text from su session, I can't see files from my home directory.
And vise versa, files saved by sublime_text are not visible to me as modev.
How to share them between users root and modev?
 
As you don't provide any answers to the questions I asked I still have no clue what you're doing.
 
Another question. If I run sublime_text from su session, I can't see files from my home directory.
And vise versa, files saved by sublime_text are not visible to me as modev.
How to share them between users root and modev?
Do you understand what su does? It changes to a different user, typically root. Normally, su changes the home directory of the process (read the man page for su, and look at the discussion of the HOME variable). The root user has a different home directory from other users. Your problem might be as simple as files being in the directory /root/ versus /home/modev.

There is a more important underlying question though. I still don't know what sublime is, but it is very likely that there is no need to run it using su. I suspect the root cause here is either a messed up system configuration, or the lack of understanding of how to use the system. Please explain to us what you are trying to accomplish, how you are going about it, and what the specific issues are.
 
I do not understan system well for doing something right. I am sure we can discuss it a long time. For me will be better to start from learning system. I prefer ro understand what I am doing.
 
Sure, we get that. But you have to understand we can't see what you're seeing and we can't see what you're doing. We're not clairvoyant. There's obviously something wrong, that's why you're getting these errors. We're just trying to figure out what exactly has gone wrong. You have to help us in order for us to be able to help you. Just blurting out random error messages doesn't help us figure out how you got them.
 
Back
Top