drwxrwxr-x 2 rynostajcar-130991 rynostajcar-130991 4.0K Feb 20 16:13 .
drwxrwxr-x 4 rynostajcar-130991 rynostajcar-130991 4.0K Feb 20 16:13 ..
-rwxrwxr-x 1 rynostajcar-130991 rynostajcar-130991 347 Feb 20 16:13 console
-rw-r--r-- 1 root root 47 Feb 20 16:17 schedule
-rwxrwxr-x 1 rynostajcar-130991 rynostajcar-130991 131 Feb 20 16:13 setup
[16:33:12] (master) bin
// ♥ whoami
rynostajcar-130991
I recently cloned a repository I made this morning onto another computer and added a new file 'schedule'. I noticed now im unable to change permissions of that file, I assume its due to the file being root. Im still new so could someone explain how to change the user from root to rynostajcar?
After looking around I found out my problem was the user, I can not change the file permissions while the user is root. I used
sudo chown rynostajcar-130991:rynostajcar-130991 ./schedule which allowed me to switch the user from root to rynostajcar-130991 and change the permissions of my file schedule. Im still having problems with the new file user always being root so working on how to fix that next.
Related
I have a custom tomcat docker image where we add the setenv.sh while building the image.
After updating the setenv.sh recently and redeploying, the change is not being seen in AWS, but if I docker pull the created image locally the change is present.
Is there any reason why this could be happening?
FROM tomcat:7.0-jdk8
...
# Copy Application
COPY ./platform-war/ ./platform-war/
COPY ./scripts/ ./scripts/
...
# Tomcat additional env
RUN /bin/bash -c "ln -s $BASE_DIR/scripts/setenv.sh /usr/local/tomcat/bin/setenv.sh"
# Make sripts executable
RUN /bin/bash -c "chmod -R +x $BASE_DIR/scripts"
And inside the image in aws the link is working as expected
-rwxr-xr-x 1 root root 1975 Jul 2 2021 digest.sh
-rwxr-xr-x 1 root root 3718 Jul 2 2021 setclasspath.sh
lrwxrwxrwx 1 root root 32 Feb 3 23:15 setenv.sh -> /opt/base/scripts/setenv.sh
-rwxr-xr-x 1 root root 1912 Jul 2 2021 shutdown.sh
yet, the content of the setenv is not the expected one, it is an old one.
The image looks updated cause it has present code changes.
I have tried to set up my ssh with this tutorial but not work I always have the same error. How i can set up it?
I have these keys:
user#LAPTOP-LC8KG6GU MINGW64 ~/Documents/programmi_prove/helloworld_project (master)
$ ls -al ~/.ssh
total 32
drwxr-xr-x 1 user 197609 0 giu 17 16:02 ./
drwxr-xr-x 1 user 197609 0 giu 17 17:13 ../
-rw-r--r-- 1 user 197609 3389 giu 17 23:12 id_rsa
-rw-r--r-- 1 user 197609 748 giu 17 23:12 id_rsa.pub
These are my errors:
user#LAPTOP-LC8KG6GU MINGW64 ~/Documents/programmi_prove/helloworld_project (master)
$ git remote add origin https://github.com/speranza493/firstapp.git
fatal: remote origin already exists.
user#LAPTOP-LC8KG6GU MINGW64 ~/Documents/programmi_prove/helloworld_project (master)
$ git remote add origin https://github.com/speranza493/firstapp.git/
fatal: remote origin already exists.
user#LAPTOP-LC8KG6GU MINGW64 ~/Documents/programmi_prove/helloworld_project (master)
$ git push -u origin master
remote: Repository not found.
fatal: repository 'https://github.com/speranza493/firstapp.git/' not found
Did your repo url change? use git remote rm origin to remove the remote and then readd it with git remote add origin YOURURLHERE
I am quite new to Git; I use SourceTree on Mac OS X.
When I start tracking an .app file, Git treats it as multiple files inside the .app content.
Is there any way to make another Git client only get that .app file as an application package rather than as multiple files?
These .app things are not files; they're directories. To convince yourself of this, try running
ls -la /Applications/
and note the d at the beginning of the permission flags corresponding to *.app entries:
...
drwxr-xr-x+ 3 root wheel 102 31 Jan 16:32 App Store.app
drwxr-xr-x+ 3 root wheel 102 31 Jan 16:32 Automator.app
drwxr-xr-x+ 3 root wheel 102 31 Jan 16:32 Calculator.app
drwxr-xr-x+ 3 root wheel 102 31 Jan 16:32 Calendar.app
drwxr-xr-x+ 3 root wheel 102 31 Jan 16:32 Chess.app
drwxr-xr-x+ 3 root wheel 102 31 Jan 16:32 Contacts.app
...
As long as Unix sees those as directories, so will Git. If you want Git to treat a *.app as a single file, you'll have to archive its contents in some fashion or another.
.app .framework .bundle .pages and more, everyone of these is application package, a directory/folder in your disk.
Either svn or git seen that as directory, because they should support windows/linux. Maybe some git client would shown application package as a "file", but I think shown as directory is better.
Another way store .app as a file is zip it and upload to git, it would be clean.
I have made changes to my Merb application and deployed those to uat for testing but I am getting
Permission denied - /mnt/project-name/config/../tmp/ruby-inline/.ruby_inline
I checked for the permissions in the path according to
Permission denied - /tmp/.ruby_inline/Inline_ImageScience_cdab.c
But I couldn't able to solve it, so reverted back my changes and deployed old SHA which was running fine but I get same "permission denied Error" with the old SHA.
I understood that the issue is not with the changes I made but with some other and I am not able to get whats going wrong and how to fix this. Please help me on this. Thanks.
adding below the permissions on this path ...
ls -l /mnt/project-name/config/../tmp/ruby-inline/.ruby_inline
-rw-r--r-- 1 nobody nogroup 24571 2013-03-13 18:54 Inline_RawParseTree_ab80.c
-rwxr-xr-x 1 nobody nogroup 33465 2013-03-13 18:54 Inline_RawParseTree_ab80.so
ls -l /mnt/project-name/config/../tmp/
lrwxrwxrwx 1 root root 22 2013-03-13 18:54 pids -> /project-name/shared/pids
-rw-r--r-- 1 root root 69 2013-03-13 18:55 restart.txt
drwx------ 3 nobody nogroup 4096 2013-03-13 18:54 ruby-inline
I don't get whats the issue and do cap deploy changes the file permissions?
This is a permission problem. The user that your application is running as is not allowed to write to /tmp/.ruby_inline. You need to either fix the permissions or ensure that the application is running as a user that has those permissions.
I am running an archival filesystem on a Windows server that does automatic offsite replication which makes it the ideal place to host Mercurial repositories and be sure of their safety. This filesystem is Windows-only so I have no choice but to use Windows as the host OS.
Setup:
Server ('ungoliant', internal to my network):
Windows 7 master repository host machine.
Cygwin ssh daemon.
hg 1.9.3
Created new repository "/cygdrive/j/mercurial/rcstudio" on Windows with "hg init".
Clients:
Mac OSX 10.7.4 running hg 2.1.2
FreeBSD 8.3 running hg 2.1.2
Problem on Clients (identical on Mac and FreeBSD):
$ hg clone ssh://cjp#ungoliant//cygdrive/j/mercurial/rcstudio
running ssh cjp#ungoliant 'hg -R /cygdrive/j/mercurial/rcstudio serve --stdio'
remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!
I've confirmed that the path and the URI are correct. There absolutely is an ".hg" directory there:
$ ls -la
total 0
drwxr-xr-x 3 cjp staff 102 Jun 5 17:41 .
drwxr-xr-x 41 cjp staff 1394 Jun 5 16:30 ..
$ scp -r cjp#ungoliant:/cygdrive/j/mercurial/rcstudio/.hg .
$ ls -la
total 0
drwxr-xr-x 3 cjp staff 102 Jun 5 17:41 .
drwxr-xr-x 41 cjp staff 1394 Jun 5 16:30 ..
drwxr-xr-x 5 cjp staff 170 Jun 5 17:41 .hg
$ ls -la .hg
total 16
drwxr-xr-x 5 cjp staff 170 Jun 5 17:41 .
drwxr-xr-x 3 cjp staff 102 Jun 5 17:41 ..
-rw-r--r-- 1 cjp staff 57 Jun 5 17:41 00changelog.i
-rw-r--r-- 1 cjp staff 33 Jun 5 17:41 requires
drwxr-xr-x 2 cjp staff 68 Jun 5 17:41 store
I've found plenty of stackoverflow questions where the issue was an improperly formatted ssh URI ... mine is formatted correctly and describes an absolute path.
I have confirmed all the following:
hg commands run fine both on the server and through ssh.
If I paste the absolute path I am able to confirm the existence of the .hg directory through ssh.
Other hg commands manually issued through ssh succeed (e.g.: ssh cjp#ungoliant 'cd /cygdrive/j/mercurial/rcstudio; hg diff;').
On the host machine I can clone locally from that same absolute path.
I'm stumped here. The Mercurial docs make it sound like 2.1.2 should be able to clone from 1.9.3 parents, so it doesn't appear to be a version conflict.
Would very much appreciate your help! Thanks!
What I have ended up with is a workaround and not an answer.
My own ignorance of remote ssh command processing lead to a misunderstanding. If I would ssh to the machine, "which hg" resulted with the cygwin-aware binary "/usr/bin/hg", but if I did a remote command "ssh cjp#ungoliant 'which hg'", it returned the path to a windows binary I also have installed on that machine.
I played with my .bashrc file and could not get remote command execution to prioritize the cygwin binary. The PATH doesn't even include the Windows PATH entries, so I started hacking around the problem and eventually decided to stop fighting with it.
I have since abandoned the entire idea because I'm convinced that even if I get it to work it will be a delicate kludge and not at all worth the time I've spent on it. I now host my repositories on a BSD box and I have a cron on the Windows machine that pulls from that repository onto the archival filesystem once every 24 hours. It's simple and worked like a charm with zero problems.
I had the same issue, solved it by adding the option --remotecmd like this
hg clone --remotecmd /usr/bin/hg ssh://me#mywindowspc//cygdrive/m/hgrepo
When you attempt an scp you would do the following:
scp username#ipaddr:/cygdrive/d/test/foo.txt ./myDestFolder
Unfortunately for hg that does not work. Instead try:
hg clone ssh://username#ipaddr/D:/testRepo