copy protected folder to Qnap

Asked by Alex Knee

I can copy folders and files normally from (Ubuntu MATE 18.04) to Qnab through the internal network, but there is a protected folder that I can only access with the superuser, and this folder is hidden, this folder is not able to be copied inside Ubuntu or copied to Qnab even though I am the admin.

What can I do so that I can copy this folder with its contents to Qnab?
Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Knee
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

How are you trying to copy the folder? Command line or GUI program? Any error messages?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Have you checked the configuration on the QNAP? Check user permissions of the user you are logging in with has access

Revision history for this message
Alex Knee (alexcityjunior) said (last edit ):
#3

actionparsnip (andrew-woodhead666)

I can access the shared folder in the Qnab and copy the files to and from it, but - as I mentioned in the question earlier - there is a folder that I cannot copy to Qnab, and I cannot even copy it to the desktop on the same ubuntu PC.

Revision history for this message
Alex Knee (alexcityjunior) said :
#4

When I tried via the GUI, I could not even copy the file to the Desktop, and the following message appeared:

Error while copying "XXXX".
There was an error copying the file into /xxx /xxx /Desktop .
Show more details
Error opening file /xxx/xxx/xxx/.xxx/xxx/xxx/XXXXX: Permission denied

 I tried to copy it from the TERMINAL and it was copied with the lock sign appearing above the file, but when I tried to copy the same file to the Qnap I could not by both ways and the error message from the TERMINAL:

cp: cannot create regular file 'smb://xxx.local/xxx/XXXXX': No such file or directory

And the error message from the GUI:

Error while copying "XXXXX".
There was an error copying the file into smb://xxx.local/xxx/.
Show more details
Error opening file /xxx/xxx/xxx/.xxx/xxx/xxx/XXXXX: Permission denied

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

You most probably need sudo to access these local files/directory

Something like

sudo cp /xxx/xxx/xxx/.xxx/xxx/xxx/XXXXX ~/Desktop

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

You don't copy the "smb://"

cp doesn't work like that. You need to mount the SMB to a folder in your file system.

What is the output of

mount

Thanks

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

You don't copy the "smb://"

cp doesn't work like that. You need to mount the SMB to a folder in your file system.

What is the output of

mount

Thanks

Revision history for this message
Alex Knee (alexcityjunior) said :
#8

Manfred Hampl (m-hampl)

I coped the file using TERMINAL and it was copied locally, but I don't know how to copy it on the network

Revision history for this message
Alex Knee (alexcityjunior) said :
#9

actionparsnip (andrew-woodhead666)

I mounted it using GUI and I need to use GUI because I'm not familiar with ubuntu Terminal

Revision history for this message
Alex Knee (alexcityjunior) said :
#10

Why can I normally copy folders and files from Ubuntu to the NAS and vice versa and cannot copy this protected folder to the NAS even though I have admin privileges???

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

You wrote:

the error message from the GUI:
Error while copying "XXXXX".
There was an error copying the file into smb://xxx.local/xxx/.
Show more details
Error opening file /xxx/xxx/xxx/.xxx/xxx/xxx/XXXXX: Permission denied

This shows that at that moment you did not have the right to read the source file, and this is not a problem with the target QNAP.

"even though I have admin privileges":
When you start a GUI program, you do not have admin privileges activated, even if you are authorized to use sudo.

Suggestions:

1. What are the access right settings of that file /xxx/xxx/xxx/.xxx/xxx/xxx/XXXXX that you cannot copy? Who is the owner? Is this the correct owner, or is that wrong and should be changed?

2. You can start a GUI program in a way that you have admin rights in it. In your case you have to give the following command in a terminal window:
sudo nautilus

Use extreme caution, because by a wrong drag and drop action you can easily kill the whole system. The access right protection of system files that normally is in place to prevent critical actions is disabled in that mode.

Revision history for this message
Alex Knee (alexcityjunior) said (last edit ):
#12

Sorry for the late reply. Thank you so much for your great efforts and support.

Finally, the issue has been solved thank God.

I think the problem was in the "Caja" application.
The Folder I was trying to copy was opening by default using the "Caja" application, so I tried to open it using the "Files" application as superuser, and then I Mount the shared folder and it worked, thank God.

your support is highly appreciated.

Thank you, especially Manfred Hampl (m-hampl).
Best regards