Having file permissions issue

What I’m trying to do is move a file to a ZFS storage share, but I’m getting “Could not write to file” popup.

ls -la gets me this
drwxr-xr-x - marc 16 Oct 20:18  .
drwxrwxrwx - root 17 Oct 05:41  …
.rwxr----- 1.6G marc 16 Oct 20:18  Vacation.mp4

ls -l
.rwxr----- 1.6G marc 16 Oct 20:18 Vacation.mp4

stat -c “%a” Vacation.mp4
740
If I understand right, marc is the owner of the file but doesn’t have permissions to the file.
Tried
chmod a+ rwx Vacation.mp4

Got
chmod: cannot access ‘rwx’: No such file or directory

I’m lost at this point, thanks for any help.

I don’t think this is actually relevant to your overall problem, but the specific issue here is that you inserted an extra space.

chmod a+rwx Vacation.mp4

I think that more information about the destination would probably be useful.

1 Like

share

ls -l

drwxrwxr-x - marc 14 Oct 16:31  .smb
drwxrwxrwx - marc 1 Oct 21:24  media
drwxrwxr-x - marc 14 Oct 16:20  personal

what other info is needed

Based on what you show, the owner has rwx permissions and the group has r, but it doesn’t seem to have a group (or perhaps it’s the owner that’s missing).

No idea what the . at the start of the line could signify, other than user error when copying, or a weird alias or function that modifies it. AFAIK it should be one of -, d or l

The size is human readable, which doesn’t match the command you show.

You seem to have rewritten the output, or have a strange alias, none of your output should look like it does.

Here’s an example:

$ ls -lh /etc/fstab 
-rw-r--r-- 1 root root 1.8K Sep 24 14:21 /etc/fstab

Notice the columns: file type, permissions, number of hard links, owner, group, size, date, time, filename.

# this will avoid any alias or function
command ls -la

Where are you trying to move it to?
What are the permissions on the parent directories of the destination?
Is the destination local?
Have you tried copying it in the CLI?

cp -a /path/to/file /new/location/

Notice the trailing / on the destination.

You have several characters that aren’t shown correctly. This is one of them:

1 Like

Copy and paste from a zsh terminal window, I guess. I commented on that already somewhere else on the Forum. :wink:

I don’t think so, it seems to be part of the output from ls.

In each case, it seems to have replaced the time.

Just to further the last comment on

We can achieve this by setting 644.

( this does not have to be in octal, but its somewhat easier if changing multiple permissions )

chmod 644 Vacation.mp4

Though the original 740 is not terrible, and we might assume has no impact on this issue.

2 Likes

Could be, but no formatting was used so we can’t see exactly. :man_shrugging:

1 Like

Indeed, but I was mostly pointing out the columns in OP’s output don’t match normal ls output, and this prevents us from seeing what’s what.

However depending on intent, 640 is also an option (not that I need to tell you that). :man_shrugging:

2 Likes
1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.