No such file or directory when chown on newly created directory
The mistake you made is to mix up /media/samsung
with ~/media/samsung
notice the ~
The ~
sign refers to your home folder location for example /home/$USER/
when you stated ~/media/samsung
you were actually typing /home/$USER/media/samsung
You could also use sudo chown paul:paul ./media/samsung
the .
means from current folder (or something like it) but this will set the ownership for the folder located at /home/$USER/media/samsung
.
Related videos on Youtube
Jomo
Updated on September 18, 2022Comments
-
Jomo almost 2 years
I have an HTML form with 10 input fields of type text. I want users to be able to copy&paste one text with 10 lines into the first input field and then automatically place them into the 10 fields with Javascript. But the line breaks seem to be removed immediately, at least by Firefox. So when I get the value of the first field with Javascript, it has no line breaks anymore.
Is there a way to get the text with the line breaks? I can't use textareas because this would lead to other problems.
-
muru over 9 yearspossible duplicate of How do I use 'chmod' on an NTFS (or FAT32) partition?
-
Rinzwind over 9 years"After creating (with sudo) the /media/samsung directory". When did you do that?(it is not in the commands you supplied).
-
muru over 9 years@Rinzwind aside from the typo,
chmod
/chown
on an NTFS in itself is not going to work, hence the possible dupe. -
Rinzwind over 9 yearsYes, I know. But it is not an answer to the problem; it is an answer to what user the wants. So I am in doubt _O-
-
muru over 9 years@Rinzwind Another XY problem, I suppose.
-
Paul Davies over 9 yearsI created the media and media\samsung folders previous to this step. That was successful. the script I included here was just to demonstrate the apparent incongruity between the existence of the folder and the error message. I shall try elmer82's proposed answer tomorrow.
-
Vaibhav Vishal almost 5 yearsBest option is to use textarea. What other problems it may cause, can you be more specific.
-
anirudh chauhan almost 5 yearsPossible duplicate of line breaks in form element input value
-
Spark Fountain almost 5 yearsCan you please show us the relevant part of your JavaScript code?
-
André Reichelt almost 5 yearsWhy can't you use a textarea? It might be easier to fix your "other problems".
-
Jomo almost 5 yearsI couldn't find a way to make a textarea behave exactly the same way as an input field and I had problems with the display of overflowing content, that is why I preferred a solution with input field.
-
-
Paul Davies over 9 yearsThank you. I shall try it tomorrow evening. It's late here now.
-
Paul Davies over 9 yearsthank you. I am a little less frustrated today and looking forward to learning more
-
Jomo almost 5 yearsThanks, this seems to work. I only had to add "event.preventDefault()", otherwise the original clipboard content would also be added to the field.
-
estavillo over 4 yearsneat; I'll add that to my answer :D