Testlink installation issue - testlink

Hello I have an issue to install testlink, I use macOS. I change the data in config.inc.php file for:
$tlCfg->log_path = '/Applications/XAMPP/xamppfiles/htdocs/testlink/logs/';
and
$g_repositoryPath = '/Applications/XAMPP/xamppfiles/htdocs/testlink/upload_area/';
Result:
Checking if /Applications/XAMPP/xamppfiles/htdocs/testlink/gui/templates_c/ directory is writable (by user used to run webserver process)Failed!
Checking if /Applications/XAMPP/xamppfiles/htdocs/testlink/logs directory is writable (by user used to run webserver process)Failed!
Checking if /Applications/XAMPP/xamppfiles/htdocs/testlink/upload_area directory is writable (by user used to run webserver process)Failed!
I don't have an idea what is wrong...?
Please help!

Goto testlink -> logs / upload_area -> press Command + I -> in Permission Enable Read Write to Everyone.

Related

postgresql-10 : The program "initdb" is needed by pg_ctl but was not found in the same directory as "pg_ctl" Check your Installation

I am new to this forum, i am facing this issue, where i get the below error.
sudo -u shahid ./pg_ctl -D /root/pgsql10x/data/ initdb
invalid binary "/root/pgsql10x/bin/pg_ctl"
invalid binary "/root/pgsql10x/bin/pg_ctl"
invalid binary "/root/pgsql10x/bin/pg_ctl"
The program "initdb" is needed by pg_ctl but was not found in the same directory as "pg_ctl".
Check your installation.
I am trying to run this from root.
I have built from the source. I am trying version 10. on CentOS7.
I downloaded direct from postgres site.
I am not facing this problem when I run as non-root user.
I have all the files in the bin directory, as shared in image here:
Finally, I was able to resolve the issue.
The problem was due to the built source was directly placed in "/root/" directory as
/root/pgsql10x/ in root login.
when i placed it in "/app/" directory as /app/pgsql10x/ things started working normally, database got created and database got working without any problem (in root login).
-Shahid
The error comes from the fact that you are trying to start the cluster as the root user you'll have to switch to postgres and try restarting the cluster again
su - postgres
pg_ctl start

EC2 FTP User Directory change

Our EC2 instance setup has an ftp user that had successful setup through the vsftpd program with an original home directory of \home\user\, I followed the instructions on this stack overflow, and had the user's shell set to /bin/false
What I'm looking to do is make the ftp user login only accessible to a particular directory, a folder in the html directory - \var\www\html\website.com\userfolder
What I've done:
Added user to a group ftpgroup
Authorized access and ownership of the new directory to the user:ftponly
Changed the user's home directory in /etc/passwd
added .ssh/authorized_keys with user's key in the new directory
changed ChrootDirectory in /etc/ssh/sshd_config to new directory
changed the permissions on the directory to chmod -R 775 user:ftpgroup
mounting \var\www\html\website.com\userfolder
Before these changes I was able to access the FTP, and now upon attempted access I receive the following errors from the Filezilla client:
Error: Disconnected: No supported authentication methods available
(server sent:publickey) ... Status: Connection attempt failed with
"ETIMEDOUT - Connection attempt timed out"
As it was working before, I'm thinking that it might have something to do with permissions, I'm just unsure of where else to change.
Thanks for any insight.
This worked for me.
After creating the user with vsftpd, the user now has access to the directory via FileZilla.
I then added a link from the home/{user} directory to the /var/www/html/{user} directory.
The user can upload files to the home directory and can view it from the html directory.
This is a simple hack. Let me know if this solves your problem.

Redis telling me "Failed opening .rdb for saving: Permission denied"

I'm running Redis server 2.8.17 on a Debian server 8.5. I'm using Redis as a session store for a Django 1.8.4 application.
I haven't changed the software configuration on my server for a couple of months and everything was working just fine until a week ago when Django began raising the following error:
MISCONF Redis is configured to save RDB snapshots but is currently not able to persist to disk. Commands that may modify the data set are disabled. Please check Redis logs for details...
I checked the redis log and saw this happening about once a second:
1 changes in 900 seconds. Saving...
Background saving started by pid 22213
Failed opening .rdb for saving: Permission denied
Background saving error
I've read these two SO questions 1, 2 but they haven't helped me find the problem.
ps shows that user "redis" is running the server:
redis 26769 ... /usr/bin/redis-server *.6379
I checked my config file for the redis file name and path:
grep ^dir /etc/redis/redis.conf =>
dir /var/lib/redis
grep ^dbfilename /etc =>
dbfilename dump.rdb
The permissons on /var/lib/redis are 755 and it's owned by redis:redis.
The permissons on /var/lib/redis/dump.rdb are 644 and it's owned by redis:redis too.
I also ran strace on the server process:
ps -C redis-server # pid = 26769
sudo strace -p 26769 -o /tmp/strace.out
But when I examine the output, I don't see any errors. In particular I don't see a "Permission denied" error as I would expect.
Also, /var/lib/redis is not an NFS directory.
Does anyone know what else could be causing this? I'd hate to have to stop using Redis. I know I can run the command "set stop-writes-on-bgsave-error yes" but that doesn't solve the problem.
This is now happening on a daily basis and the only way I can stop the error is to restart the Redis server.
Thanks.
I just had a similar issue. Despite my config file being correct, when I checked the actual dbfilename and dir in redis-client, they were incorrect.
Run redis-cli and then
CONFIG GET dbfilenamewhich should return something like
1) "dbfilename"
2) "dump.rdb"
1) is just the key and 2) the value. Similarly then run CONFIG GET dir should return something like
1) "dir"
2) "/var/lib/redis"
Confirm that these are correct and if not, set them with CONFIG SET dir /correct/path
Hope this helps!
If you have moved Redis to a new mounted volume: /mnt/data-01.
sudo vim /etc/systemd/system/redis.service
Set ReadWriteDirectories=-/mnt/data-01
sudo mkdir /mnt/data-01/redis
Set chown and chmod on new redis data dir and rdb file.
The permissons on /var/lib/redis are 755 and it's owned by redis:redis
The permissons on /var/lib/redis/dump.rdb are 644 and it's owned by redis:redis
Switch configurations while redis is running
$ redis-cli
127.0.0.1:6379> CONFIG SET dir /data/tmp
redis-cli 127.0.0.1:6379> CONFIG SET dbfilename temp.rdb
127.0.0.1:6379> BGSAVE
tail /var/log/redis/redis.cnf (verify saved)
Start Redis Server in a directory where Redis has write permissions
The answers above will definitely solve your problem, but here's what's actually going on:
The default location for storing the rdb.dump file is ./ (denoting current directory). You can verify this in your redis.conf file. Therefore, the directory from where you start the redis server is where a dump.rdb file will be created and updated.
Since you say your redis server has been working fine for a while and this just started happening, it seems you have started running the redis server in a directory where redis does not have the correct permissions to create the dump.rdb file.
To make matters worse, redis will also probably not allow you to shut down the server either until it is able to create the rdb file to ensure the proper saving of data.
To solve this problem, you must go into the active redis client environment using redis-cli and update the dir key and set its value to your project folder or any folder where non-root has permissions to save. Then run BGSAVE to invoke the creation of the dump.rdb file.
CONFIG SET dir "/hardcoded/path/to/your/project/folder"
BGSAVE
(Now, if you need to save the dump.rdb file in the directory that you started the server in, then you will need to change permissions for the directory so that redis can write to it. You can search stackoverflow for how to do that).
You should now be able to shut down the redis server. Note that we hardcoded the path. Hardcoding is rarely a good practice and I highly recommend starting the redis server from your project directory and changing the dir key back to./`.
CONFIG SET dir "./"
BGSAVE
That way when you need redis for another project, the dump file will be created in your current project's directory and not in the hardcoded path's project directory.
You can resolve this problem by going into the redis-cli
Type redis-cli in the terminal
Then write config set stop-writes-on-bgsave-error no and it resolved my problem.
Hope it resolved your problem
Up to redis 3.2 it shipped with pretty insane defaults which opened the port to the public. In combination with the CONFIG SET instruction everybody can change your redis config from outside easily. If the error starts after some time, someone probably changed your config.
On your local machine check that
telnet SERVER_IP REDIS_PORT
is denied. Otherwise check your config, you should have the setting
bind 127.0.0.1
enabled.
Dependent on the user that runs redis, you should also check for damage that the intruder has done.

Pycharm debug and user permissions

I am trying to debug Frappe Framework (based on Python) with PyCharm, the debugger works fine and breaks at the selected breakpoints in the code.
At the line
stream = open(self.baseFilename, self.mode)
where it is trying to open a log file for writing, I get Permission denied: /home/frappeuser/frappe-bench/logs/bench.log. I "su ed" as root.
Frappe user is a sudo user, where I normally run the command bench start to start Frappe and it works fine from the command line, but not while I am debugging.
My question is why it is denying access to the log file when I am root. Not sure if PyCharm can be configured for different user levels.
the problem is not relevant to Pycharm, you have to change the permissions of that file so the working user can read the file. try help chmod or visit here http://ss64.com/bash/chmod.html

Error while installing COMSOL on amazon AMI

I was trying to run COMSOL on Amazon AWS.
While file following the link RunningCOMSOLOnTheAmazonCloud.pdf,
I face errors when trying to install COMSOL on the AMI. When I try to install COMSOL into the remote terminal: cd ~/Private/comsol/COMSOL43b_dvd/setup ami, I get this error:
bash: cd: /root/Private/comsol/COMSOL43b_dvd/setup: No such file or directory
The issue seems to be caused by you trying to navigate to a non existing directory
Please check that the directory exists
ls /root/Private/comsol/COMSOL43b_dvd/
I assume you're at part 2 on page 25 of this document. The instructions there are not very well worded but I think I can see what's going wrong:
2 Install COMSOL:
cd ~/Private
/comsol/COMSOL43b_dvd/setup ami
Answer the following questions:
Enter the installation directory: (press enter for default:
/home/ec2-user/Private/)
Accept the license agreement (press the space bar to flip the pages until the last
one, and answer yes to the question if you agree).
Enter the path to the license file: (press enter for default: 1718#localhost)
The tilde (~) is a shorthand for any user's home directory. This is usually in the form /home/user. If you are logged in as the root user, then the home directory is /root. It looks like you are still the root user, when you should be ec2-user, which is Amazon's default username for most of their Linux EC2 instances. (The suggested default installation directory of /home/ec2-user/Private is what makes me think that)
Try running su - ec2-user to change to the right user, then type pwd to get the console to print out the directory you're in. You should be in the home directory.
Use the ls command to list all the contents of the directory you are in, or ls -l to give you a more detailed list.
You can also use the tab button on your keyboard to autocomplete filenames if they exist. Pressing tab twice will give you a list of options. If pressing tab doesn't complete, or show a list of options after a double tap, then the directory does not exist.