chmod not working cygwyn

saiganesh@LAPTOP-EJBON1NM ~
$ cat>test4.txt
eee
saiganesh@LAPTOP-EJBON1NM ~
$ ls -l
total 3
-rwxrwxrw- 1 saiganesh None 5 Jan 14 21:54 test.file
-rw-r--r-- 1 saiganesh None 0 Jan 14 21:54 test2.file
-rw-r---wx 1 saiganesh None 3 Jan 14 23:02 test3.file
-rw-r--r-- 1 saiganesh None 3 Jan 14 23:04 test4.txt

saiganesh@LAPTOP-EJBON1NM ~
$[b] chmod 642 test4.file[/b]
chmod: cannot access 'test4.file': No such file or directory

saiganesh@LAPTOP-EJBON1NM ~
$ ls -l
total 3
-rwxrwxrw- 1 saiganesh None 5 Jan 14 21:54 test.file
-rw-r--r-- 1 saiganesh None 0 Jan 14 21:54 test2.file
-rw-r---wx 1 saiganesh None 3 Jan 14 23:02 test3.file
[b]-rw-r--r-- 1 saiganesh None 3 Jan 14 23:04 test4.txt[/b]

saiganesh@LAPTOP-EJBON1NM ~
$

Open in new window


when i tried as above it is not working in cygwin

when i tried here
https://www.tutorialspoint.com/execute_bash_online.php

it says
$bash -f main.sh
chmod: changing permissions of 'main.sh': Operation not permitted
how to see terminal in above site?

please advise
LVL 7
gudii9Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Prabhin MPEngineer-TechOPSCommented:
Hi,
make sure that you have the rights to do chmod operation. Check the permission of the file.
1
nociSoftware EngineerCommented:
That needs a little amendment:

Check WINDOWS permission of the file. (In explorer verify that you have control right).
0
nociSoftware EngineerCommented:
That needs a little amendment:

Check WINDOWS permission of the file. (In explorer verify that you have control right).
I an bit sure if getfacl / setfacl can be used on cygwin (unable to check  atm.).
0
skullnobrainsCommented:
read the message : "no such file or directory" is quite explicit. your file is named test4.txt, not test4.file
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.