I am trying to work with Openfire server on a Mac. I currently have setup the server to work with an embedded database, but I don't know or can't place the html/php files that I want to use with the server. The Openfire index page states this in Server Information -> Server Properties:
Server Directory: /usr/local/openfire
The problem with this directory is that I can't locate it with finder, and when I try to "cd" into the openfire directory through Terminal (Linux) I get this error:
-bash: cd: openfire: Permission denied
Does anyone know a way around this, or how might I place the files?
Entering super user mode first is one solution:
sudo su
and then:
cd /usr/local/openfire
Once you're done, type exit to get out of super user mode.
Could I ask, why are you trying to add files to that directory though?
Related
I'm trying to setup a code-server (vscode in browser) instance and read/write from a mounted samba share. Unfortunately when I try to add a file it gives me an error that I do not have permissions to read/write to that folder. When I try to add files with the same credentials on Windows it does work though. This is the error that VSCode gives me:
Unable to write file
'vscode-remote://localhost:8080/home/user/repository/test'
(NoPermissions (FileSystemError): Error: EACCES: permission denied,
open '/home/gmetitieri/user/test')
If I sudo touch file.txt then the file will be created and added. I already used chmod and added full access to the folder but it still won't work. Is this a credentials thing or am I missing something?
I already tried this answer but it still doesn't let me write as non-root
Edit: This is the command I used to mount the drive (just with different folder names and IP address):
sudo mount -t cifs -o rw,vers=3.0,credentials=/root/.examplecredentials //192.168.18.112/sharedDir /media/share
Considering "non-root through Samba", especially in new releases of OpenSuse (...15.3 -- 15.4), I do few movements into normal configuration panels (no sudo commands or anything technical).
Using Yast Firewall section -- For now (immediate solution):
I turn off the firewall, then see what you can turn on (after this) to keep the samba working with Microsoft Windows.
More details on how to do this with images on my website.
This happens when the directory on the Samba share does not have permission for non-root users.
In your smb4.conf file:
[test]
comment = Test share
path = /path/to/directory
force user = unixuser
valid users = sambauser
In this example, unixuser should be the owner of the files in /path/to/directory. The user logged into Samba in this example is a user called sambauser.
I am trying to set up a webserver running on Ubuntu. I have installed Apache and changed the root directory to an other directory within /var/www/. When I copy the index.html provided by Apache to that directory, I can access that file via remote webbrowser. But if I want to use a different index.html file, even really basic ones, I get an error: "Forbidden You don't have permission to access this resource". I have also tried to download that html, alter just a few lines and put it back on to the server with the result that it also shows that error. If I rename the initially provided index.html to index2.html I can still access it. I do not understand how it is possible that only this exact file is working.
I have tried to grant more permissions with Directory and restarted Apache but it won't work. I am rather new to Linux and Apache, can only use the terminal on my webserver and I do not know what else to do. Please help.
Change the permissions on the file, too, not just the folder. Pretty sure this fix it.
For diagnostic correction, allow permission for all by typing:
sudo chmod -R 777 /path/to/index.html
I want to copy a war file to my tomcat server. the server is linux
First of all, i totally can do this:
ssh dev#myserver
then i put my password, it works
then i can do this:
cd /bla/bla/tomcat/webapps
now i want to copy the war, i do this:
scp myFile.war dev#myserver:/bla/bla/tomcat/webapps/myFile.war
i put the password,
but then i get this error message:
scp: /bla/bla/tomcat/webapps/myFile.war: Permission denied
what am i doing wrong please?
sidenote, my operation system is mac os
update how can I use sudo to do the copy?
this works for me
scp myFile.war root#myserver:/bla/bla/tomcat/webapps/myFile.war
I am trying to pull a file from another computer into R environment in RStudio on Centos 6
I've tried it in plain R first and when I issue
readLines(pipe( 'ssh root#X.X.X.X "cat /path/somefile.sh"' ))
it correctly asks me for the password of my ssh key and reads the contents.
However if the same command is executed from RStudio all I get is:
ssh_askpass: exec(rpostback-askpass): No such file or directory
Permission denied, please try again.
ssh_askpass: exec(rpostback-askpass): No such file or directory
Permission denied, please try again.
ssh_askpass: exec(rpostback-askpass): No such file or dire
Permission denied (publickey,gssapi-with-mic,password).
I suspect that the reason is because rstudio on centos actually uses rstudio-server user (and gui is provided in a browser). Does anyone know how to properly access ssh'd resources from it ?
UPD: after executing
Sys.setenv(PATH = paste0(Sys.getenv('PATH'), ':/usr/lib/rstudio-server/bin/postback'))
as suggested below it won't output askpass errors, but it still does not work. Now it seems that the console is waiting for the command to execute indefinitely
rpostback-askpass is part of RStudio. It may help to add its location (/usr/lib/rstudio-server/bin/postback on my system) to PATH so that ssh can find it:
Sys.setenv(PATH = paste0(Sys.getenv('PATH'), ':/usr/lib/rstudio-server/bin/postback'))
UPDATE RCurl has scp function for copying files over ssh connection. See this answer for details. If you are running your scripts with RStudio, you can use its API to enter the ssh password interactively with hidden input:
pass <- .rs.askForPassword("password?")
and rstudioapi can help to determine whether the script is launched by RStudio or not.
just moved from shared hosting to a dedicated server, trying to create two new directorys in the root of the server but I get this when I use the Plesk control panel
Error: Unable to create directory /other-files: filemng: Error occurred during /bin/mkdir command.
So I tried executing this
$old_umask = umask(0);
$return = mkdir('../other-files', 0770);
umask($old_umask);
var_dump($return);
which returns false
I've downloaded putty but I've never used SSH commands and to my understanding I think I need to create the folder as a root user, but I really don't want to do something wrong and I don't think I can log in as the root user, but I can execute a su command which seems to be what I need to do... any help?