Cannot write to file with fopen() , Permission denied

I get failed to open stream: Permission denied when trying to create a file, or write to a file (if I manually create it first in FTP or SSH).

I’ve looked at many aspects but I don’t find what may be the issue. So maybe it could related to wordpress in some way. The wordress setup is based on Bedrock (with a different folder structure).

Here are the details:

I do an ajax call from the frontend, which reaches a method in the backend, inside a plugin script. The method is an ajax function which is registered with a "wp_ajax_nopriv" action.

Folder path: This script is in /mnt/persist/www/

Owner: The "src" folder and all its parent folders have a certain user, "deploy" as owner.

Permissions: All folders have 755. The file: If I create it manually, I have set it to ‘775’ and deploy as owner.

Current user: If I do get_current_user() inside the ajax method, I get "deploy".

Working directory: If I run getcwd() inside the script however, the working directory turns out to be: /mnt/persist/www/

I changed permissions in "src" to 777.

I use "fopen" like this:

$  fp = fopen( $  folderPath . $  filename . '.txt' ,"a" );        if(!$  fp){     die('Error: ' . implode(',',error_get_last())); } 

If I try to create/write to a file in the current directory (not using a folder path), it doesn’t work, and if I try to use the path: /mnt/persist/www/ (which is verified with file_exists), plus the filename, it gives the same Permission denied error.

If I SSH into the server and change user to deploy, and go into "src" folder, I can create a file with "touch myfile.txt".

Concerning the working directory ( /mnt/persist/www/ , those folders also have "deploy" as the owner, and permissions set to 755.

Can I trust get_current_user(), which says deploy? I thought I might be running it as www-data, but since it says deploy, there shouldn’t be any problem?

I’m a bit clueless..

#1044 – Access denied for user ‘cpses001’@’localhost’ to database ‘test_db’

I have purchase i hosting with cpanel in godaddy and I am migrating a WordPress site, but the problem when I am trying to import database it gave me this error #1044 - Access denied for user 'cpses001'@'localhost' to database 'test_db'

I am accessing phpMyAdmin from cPanel but before that I have created the database test_db created user associated with it so when I navigate to phpMyAdmin it show me that i am logged in with the user cpses001'@'localhost which the same user used for cPanel login and it doesn’t show the user that I have created. "the user I have created have full privileges".

There is no way to logout and login to phpMyAdmin from the interface, so I tried to download the last version of phpMyAdmin and uploaded to site root directory then o navigate to it and logged in with the user that have full privileges and when I started to import the database it throw the same error.

I have contacted Godaddy support but they told me this out of their scope. so now I am stuck and i have no idea what to do as I tried all the ways. Hope someone here can save hours of pain. thanks in advance.

Query to polybase external table giving error “Access to the remote server is denied because no login-mapping exists.”

we have successfully created all pre-requisite of creating external tables using SQL Server 2017 Standard Edition CU22 Polybase.

The issue we have is the non-sysadmin login can’t query those external tables .It shows below error.

Msg 7416, Level 16, State 2, Line 29 Access to the remote server is denied because no login-mapping exists.

The sysadmin login can query external tables without any issue. Is there anybody saw this issue and can help to resolve it.

How is Authentication Required different from Access Denied [closed]

I was trying a bug bounty challenge and I was given a vulnerable URL which needs a password to access it.

  • Case 1: When I try to do SQL-Injection in Username and Password, I get a page: access denied “Username not found
  • Case-2: If I keep entering random normal usernames and passwords, I get the “Enter username and Password” dialog box, and after so many trials I get the page which says: WWW-Authentication needed!

How are the two scenarios different?

Is Case 1 different than Case 2 in terms of vulnerabilities?

enter image description here

Can a firewall duplicate denied traffic onto a TAP/SPAN port?

We have quite a number of Palo Alto firewalls at various points in our infrastructure, for east-west, north-south, and DMZ traffic, all managed with Panorama. These firewalls have TAP ports which are connected to a network packet broker (NBP) platform that balances session streams and captures all traffic as pcaps. Frequently, I will want to investigate traffic that the firewall has denied – either incoming attack traffic from the internet, or internal east-west traffic that is being incorrectly blocked. However it would seem that only traffic the firewall has allowed to pass is being mirrored to the TAP port. Is it possible to configure the firewalls to also mirror denied traffic? How would this be done?

user gets access denied when adding new document in folder

In my SharePoint 2013 environment I have a site where the admin user group has design rights + security management rights. A readers permission group has read access on the site. I have a document library with one folder. On the folder I break the inheritance and give the readers group contribute access.

When the user from the readers groups wants to add a new document (Ribbon –> new document –> document) he gets a pop-up with an access denied message.

Why can’t the user add a new document with contribute access?

WordPress php mysql errors – errcode: 13 permission denied

I’m developing a WordPress based website using the latest XAMPP release from Oct 9 2019 with Apache 2.4.41, MySQL/MariaDB 10.4.8 and php 7.3.10 using localhost on a Windows 10 machine.

Since updating XAMPP I have been besieged with errors similar to the following:

PHP Warning: mysqli_query(): (HY000/6): Error on delete of ‘C:\xampp\tmp#sql35b0_ee_0.MAI’ (Errcode: 13 "Permission denied") in C:\xampp\htdocs\amc\wp-includes\wp-db.php on line 2007

WordPress database error Error on delete of ‘C:\xampp\tmp#sql35b0_ee_0.MAI’ (Errcode: 13 “Permission denied”) for query SHOW FULL COLUMNS FROM wp_options made by wp_reschedule_event, wp_schedule_event, _set_cron_array, update_option

I have checked the permissions of \xampp\tmp 50 times and authenticated users, system, administrators and users all have full control. I have also deleted WordPress and the associated data base and data tables several times yet the error on delete permission errors continue.

I’m seriously at a loss so any help would be greatly appreciated.

Thanks in advance