Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I can not delete the file have tried rm and rm -rf also
Code:
user:~/samba/folder1/folder2$ ls
'List Teams.ods'
user:~/samba/folder1/folder2$ rm List\ Teams.ods
rm: unable to remove 'List\ Teams': file or directory not found
user:~/samba/folder1/folder2$ ls
'List Teams.ods'
File permission
Code:
$ ls -al
-rwxrwxrwx 1 user users 24809 May 18 10:14 'List Teams.ods'
The error message states that it can't find the 'List\ Teams' file where as the file in the folder is 'List\ Teams.ods'. Try deleting with 'rm *.ods' (without the quotes) in the correct directory.
Another option is to run "rm *" (without the quotes)
I can not delete the file have tried rm and rm -rf also
Code:
user:~/samba/folder1/folder2$ ls
'List Teams.ods'
user:~/samba/folder1/folder2$ rm List\ Teams.ods
rm: unable to remove 'List\ Teams': file or directory not found
user:~/samba/folder1/folder2$ ls
'List Teams.ods'
File permission
Code:
$ ls -al
-rwxrwxrwx 1 user users 24809 May 18 10:14 'List Teams.ods'
user:~/samba/folder1/folder2$ getfacl -aed List\ Teams.ods
# file: List Teams.ods
# owner: user
# group: users
user::rwx
group::rwx
other::rwx
Code:
user:~/samba/folder1/folder2$ getfacl -t List\ Teams.ods
# file: List Teams.ods
USER user rwx
GROUP users rwx
other rwx
Also tried deleting file using inode but was not sucessful.
Where is this drive located? How is it connected? Would seem to be a network drive, on a Windows system; what are the permissions there?? Does the user you're using to mount that drive have permissions to delete/modify??
Yes it is a network drive (NAS) https://kb.synology.com/en-nz/search and user has the permission to modify and delete the file. Moreover can also use chmod and chown for changing file permission and ownership respectively.
Yes it is a network drive (NAS) https://kb.synology.com/en-nz/search and user has the permission to modify and delete the file. Moreover can also use chmod and chown for changing file permission and ownership respectively.
Please provide all details when asking a question; best to tell us it's a synology nas connected over a network, versus us having to guess.
synoacltool is for use in checking ACL's on a Synology NAS, so you'll have to check things out on the NAS itself. Also, you can mount it via NFS or Samba, versus a CIFS mount, and you can even mount it using SSHFS. Have you tried mounting it in other ways??
With those file permissions at first glance the file appears accessible to write and delete.
However, I have to ask what are the permissions of that directory where the file is located?
With linux, even if the user has 'rwx' permissions on the file, if they do not also have write permissions in the directory they cannot write a new file nor delete a file there because deleting a file involves altering the directory contents. Check that next.
Last edited by computersavvy; 05-23-2022 at 08:53 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.